get some errors when compile geogebra source

chen chao shared this question 3 years ago
Answered

I want to extend some of geogebra's features and need to compile the source code, but I get a lot of errors when compiling according to the instructions on “SetUp — get GeoGebra's source code set up in Eclipse“,as shown below:


Description	Resource	Path	Location	Type
StringProvider cannot be resolved to a type	Parser.java	/common/src/main/javacc/org/geogebra/common/kernel/parser	line 41	Java Problem
StringProvider cannot be resolved to a type	Parser.java	/common/src/main/javacc/org/geogebra/common/kernel/parser	line 58	Java Problem
StringProvider cannot be resolved to a type	Parser.java	/editor-base/src/main/javacc/com/himamis/retex/editor/share/io/latex	line 16	Java Problem
StringProvider cannot be resolved to a type	Parser.java	/editor-base/src/main/javacc/com/himamis/retex/editor/share/io/latex	line 62	Java Problem
StringProvider cannot be resolved to a type	PolynomialParser.java	/common/src/main/javacc/org/geogebra/common/kernel/prover/polynomial	line 19	Java Problem
StringProvider cannot be resolved to a type	PolynomialParser.java	/common/src/main/javacc/org/geogebra/common/kernel/prover/polynomial	line 32	Java Problem
StringProvider cannot be resolved to a type	PolynomialParser.java	/common/src/main/javacc/org/geogebra/common/kernel/prover/polynomial	line 45	Java Problem
The GWT SDK JAR gwt-servlet.jar is missing in the WEB-INF/lib directory	WEB-INF	/renderer-web/war	Unknown	GWT Problem
The GWT SDK JAR gwt-servlet.jar is missing in the WEB-INF/lib directory	WEB-INF	/web/war	Unknown	GWT Problem
The GWT SDK JAR gwt-servlet.jar is missing in the WEB-INF/lib directory	war	/keyboard-web	Unknown	GWT Problem
The output directory for the project should be set to /web/war/WEB-INF/classes	web		Unknown	GWT Web App Problem
The web.xml file does not exist	WEB-INF	/editor-web/war	Unknown	GWT Web App Problem
The web.xml file does not exist	WEB-INF	/renderer-web/war	Unknown	GWT Web App Problem
The web.xml file does not exist	war	/keyboard-web	Unknown	GWT Web App Problem

Can anyone tell me what this is, thanks!


.

Best Answer
photo

JavaCC hasn't run properly

Comments (9)

photo
1

What features do you want to add?

photo
1

thank your reply! I want to be able to add Global Javascript configuration in the Geogebra configuration, otherwise I will manually configure it each time I create a new geogebra. In addition, I want to automatically complete the prompt for the English command input in the Chinese environment.

photo
1

Hello, Michael Borcherds, can the compile error resolved? please help me, thanks!

photo
2

JavaCC hasn't run properly

photo
1

Hello, Michael Borcherds, thanks!

>java -classpath C:/Users/chris/eclipse/java-2019-06/eclipse/../../../.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-5.0.jar javacc Parser.jj (@ 05/09/2019 07:54:28)

Java Compiler Compiler Version 5.0 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file Parser.jj . . .
Warning: Line 3, Column 4: Bad option name "JAVA_TEMPLATE_TYPE".  Option setting will be ignored.
Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer using a Reader with the correct character encoding.
File "TokenMgrError.java" is being rebuilt.
File "ParseException.java" is being rebuilt.
File "Token.java" is being rebuilt.
File "SimpleCharStream.java" is being rebuilt.
Parser generated with 0 errors and 1 warnings.

>java -classpath C:/Users/chris/eclipse/java-2019-06/eclipse/../../../.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-5.0.jar javacc Parser.jj (@ 05/09/2019 07:58:27)
Java Compiler Compiler Version 5.0 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file Parser.jj . . .
Warning: Line 47, Column 4: Bad option name "JAVA_TEMPLATE_TYPE".  Option setting will be ignored.
Warning: Line 271, Column 5: Non-ASCII characters used in regular expression.
Please make sure you use the correct Reader when you create the parser, one that can handle your character set.
File "TokenMgrError.java" is being rebuilt.
File "ParseException.java" is being rebuilt.
File "Token.java" is being rebuilt.
File "SimpleCharStream.java" is being rebuilt.
Parser generated with 0 errors and 2 warnings.

>java -classpath C:/Users/chris/eclipse/java-2019-06/eclipse/../../../.p2/pool/plugins/sf.eclipse.javacc_1.5.33/jars/javacc-5.0.jar javacc PolynomialParser.jj (@ 05/09/2019 07:58:35)
Java Compiler Compiler Version 5.0 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file PolynomialParser.jj . . .
Warning: Line 16, Column 4: Bad option name "JAVA_TEMPLATE_TYPE".  Option setting will be ignored.
File "TokenMgrError.java" is being rebuilt.
File "ParseException.java" is being rebuilt.
File "Token.java" is being rebuilt.
File "SimpleCharStream.java" is being rebuilt.
Parser generated with 0 errors and 1 warnings.

this is the javacc console output, Can you tell me where it is not working properly for javacc?


thanks!

photo
1

I have solved this problem by updating javacc 5.0 to javacc 7.0, the StringProvider only exists javacc 6+


Thanks Michael Borcherds for pointing this out!

photo
1

Hello, Michael.

I still have a question about how to configure javacc and which version of javacc is required. I encountered a lot of "Unreachable code" errors with javacc 6.2 or 7.0.4.

f371025dc4243d74d42daa6c34abab3a


Although I can manually modify these problems one by one, I suspect that I did not properly configure javacc, so I would like to ask you how to configure javacc, thank you.

thanks.

photo
1

"I have solved this problem by updating javacc 5.0 to javacc 7.0, the StringProvider only exists javacc 6+" , could you please be more specific?


https://help.geogebra.org/t...

photo
1

finally solved this issue in https://help.geogebra.org/t...

the caveat is not use javacc plugin for eclipse. build.gradle already have 'ca.coglinc.javacc' configured.


use the gradlew commond line to let gradle call javacc plugin and generate .java file for .jj files.

photo
© 2022 International GeoGebra Institute