StringProvider cannot be resolved to a

guyuming shared this question 2 months ago

i got the same error as described in

the original poster there said the problem solved by "I have solved this problem by updating javacc 5.0 to javacc 7.0, the StringProvider only exists javacc 6+"


I am new to java, and does not know how to upgrade the eclipse java plugin. Anyway, i found a workaround: i just downloaded javacc-7.0.9.jar , replace the /home/guyuming/.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-5.0.jar with the downloaded one. And import the gradle project again. but it does not work. I should have taken a screenshot.

And i found there is a file /home/guyuming/.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-6.0.jar, I rename it to javacc-5.0.jar, and import the gradle project again. Still not work. You can see in the screenshot that although the file name, it says "Java Compiler Compiler version 6.0_1"

by the way, I don't even know how to make the javacc run again after a replacing the file, anyway, i use a virtual machine and i can revert to original state and try again.

Comments (3)


made some progress but problem still not resolved:

1. in Eclipse, project->clean menu will delete the .java files for .jj file and recreate them again.

2. with javacc-7.0.9.jar, will be created for the common package, but it will not be created for the editor-base package.




finally solved this issue:

i should not install the javacc plugin for eclipse, build.gradle in common folder already has 'ca.coglinc.javacc' version '2.4.0' configured.

so, i uninstalled the javacc plugin for eclipse. delete the .java files for the .jj files created before manually.

And then run ./gradew clean

./gradlew :desktop:run

as decribed in

gradlew run will call javacc plugin and create .java files for .jj file in common/build/generated/javacc

them i imported the project into Eclipse again. actually, i deleted the old eclipse workspace and created a new one. i am not sure whether this is need or not.

but anyway, in eclipse package explore, i can right click desktop->src/main/java->geogebra-> and select debug as->java application

© 2020 International GeoGebra Institute