Open uwmyuan opened 6 years ago
Not sure what is going wrong here but I think it is something to do with "import ognl.JavaCharStream" this project has nothing to do with ognl whatever that is and so such a line should not appear anywhere in the source code (and doesn't appear to be in the source code). If you work out when this import is appearing then I think you will get to the root of the problem.
Thanks for your kind reply.
Sorry for the confusion. The compiler cound not find the class JavaCharStream and I found a library ognl
with this class name and import it.
How should I compile it properly? Thanks.
I cloned the original code of version 0.3.1. When compiling the project ant jar run
, I got the following error.
Buildfile: /home/yuan2/gnuprologjava-0.3.1/build.xml
init:
compile:
[javac] Compiling 243 source files to /home/yuan2/gnuprologjava-0.3.1/build/code
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:13: error: cannot find symbol
[javac] JavaCharStream stream;
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:140: error: cannot find symbol
[javac] public TermParser(JavaCharStream str, Environment env)
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:151: error: cannot find symbol
[javac] public TermParser(JavaCharStream stream)
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:10: error: package ognl does not exist
[javac] import ognl.JavaCharStream;
[javac] ^
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:816: error: cannot find symbol
[javac] JavaCharStream jj_input_stream;
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1391: error: cannot find symbol
[javac] public TermParserTokenManager(JavaCharStream stream){
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1400: error: cannot find symbol
[javac] public TermParserTokenManager (JavaCharStream stream, int lexState){
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1406: error: cannot find symbol
[javac] public void ReInit(JavaCharStream stream)
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1423: error: cannot find symbol
[javac] public void ReInit(JavaCharStream stream, int lexState)
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1451: error: cannot find symbol
[javac] protected JavaCharStream input_stream;
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:137: error: cannot find symbol
[javac] this(new JavaCharStream(r, line, col), environment);
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:854: error: reference to TermParser is ambiguous
[javac] this(stream, null);
[javac] ^
[javac] both constructor TermParser(JavaCharStream,Environment) in TermParser and constructor TermParser(InputStream,String) in TermParser match
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:858: error: cannot find symbol
[javac] try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParser.java:884: error: cannot find symbol
[javac] jj_input_stream = new JavaCharStream(stream, 1, 1);
[javac] ^
[javac] symbol: class JavaCharStream
[javac] location: class TermParser
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1393: error: cannot find symbol
[javac] if (JavaCharStream.staticFlag)
[javac] ^
[javac] symbol: variable JavaCharStream
[javac] location: class TermParserTokenManager
[javac] /home/yuan2/gnuprologjava-0.3.1/src/gnu/prolog/io/parser/gen/TermParserTokenManager.java:1393: error: illegal start of type
[javac] if (JavaCharStream.staticFlag)
[javac] ^
[javac] 16 errors
[javac] 1 warning
BUILD FAILED
/home/yuan2/gnuprologjava-0.3.1/build.xml:103: Compile failed; see the compiler error output for details.
Total time: 3 seconds
Could you share any clue about this error? Thanks.
Hi,
Thanks. I got the latest release. However, I cannot build this project. I got the following error