Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a compiled jar file for 0.3.1 released? #38

Open
uwmyuan opened this issue May 10, 2018 · 3 comments
Open

Is a compiled jar file for 0.3.1 released? #38

uwmyuan opened this issue May 10, 2018 · 3 comments

Comments

@uwmyuan
Copy link

uwmyuan commented May 10, 2018

Hi,

Thanks. I got the latest release. However, I cannot build this project. 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.
@drt24
Copy link
Owner

drt24 commented May 14, 2018

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.

@uwmyuan
Copy link
Author

uwmyuan commented May 14, 2018

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.

@uwmyuan uwmyuan changed the title Could you provide a jar file? Could you release a compiled jar file? May 21, 2018
@uwmyuan
Copy link
Author

uwmyuan commented Jun 1, 2018

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.

@uwmyuan uwmyuan changed the title Could you release a compiled jar file? Is a compiled jar file for 0.3.1 released? Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants