Re: OpenJDK 11 doesn't read ANTLR v4 runtime .jar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/21 2:34 PM, Anatoli Babenia wrote:
> Hello.

Him

> 
> However, when I specify it in `-classpath`, the `javac` still doesn't those.
> 
>     $ javac -classpath /usr/share/java/antlr4-runtime.jar  Hello*.java         
>     HelloBaseListener.java:3: error: package org.antlr.v4.runtime does not exist
>     import org.antlr.v4.runtime.ParserRuleContext;
>                               ^
>    HelloBaseListener.java:4: error: package org.antlr.v4.runtime.tree does not exist
>    import org.antlr.v4.runtime.tree.ErrorNode;

It works on my Fedora 33. I think you might have some errors in
the classpath, I used the following command:

$ javac -cp
.:/usr/share/java/antlr4/antlr4.jar:/usr/share/java/antlr4/antlr4-runtime.jar:$CLASSPATH
Hello*.java
$ ls
 HelloBaseListener.class   Hello.interp        HelloLexer.java
HelloListener.java  'HelloParser$RContext.class'
 HelloBaseListener.java    HelloLexer.class    HelloLexer.tokens
HelloParser.class    Hello.tokens
 Hello.g4                  HelloLexer.interp   HelloListener.class
HelloParser.java

$ java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment 18.9 (build 11.0.10+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9, mixed mode, sharing)

$ javac -version
javac 11.0.10


Best regards,
Markku
                                    ^
> 
> I am on Fedora 33.
> _______________________________________________
> java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
> 
_______________________________________________
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux