Re: javac unaware of Antlr4 (was: Re: javac - error: package org.antlr.v4.runtime does not exist)
On Thu, Jul 09, 2020 at 11:32:31AM +0100, Sam Kuper wrote:
> This raises a question, though.
>
> Since javac and Antlr4 were both installed via apt (see above), why was
> it necessary for me to manually set the CLASSPATH in order for javac to
> be able to find Antlr4's jars? I.e. shouldn't apt (or the packages
> installed by apt) have configured things, during installation, so that
> such manual intervention would be unnecessary?
>
> If it should have done that, should I file a bug report?
My question above was not as precise as it should have been, sorry.
What I meant was: after having done
$ mkdir /tmp/antlr-test
$ cd $_
$ wget --page-requisites --recursive --level=inf --convert-links \
--no-parent \
https://www.cs.cornell.edu/courses/cs4120/2013fa/handouts/antlr.html
$ cd www.cs.cornell.edu/courses/cs4120/2013fa/handouts/xi
$ antlr4 XiLexer.g4 XiParser.g4 -no-listener
why was it not sufficient for me to do
$ javac Xi*.java
i.e. why was it instead necessary for me to do
$ CLASSPATH='.'
$ CLASSPATH+=':/usr/share/java/stringtemplate4.jar'
$ CLASSPATH+=':/usr/share/java/antlr4.jar'
$ CLASSPATH+=':/usr/share/java/antlr4-runtime.jar'
$ CLASSPATH+=':/usr/share/java/antlr3-runtime.jar/'
$ CLASSPATH+=':/usr/share/java/treelayout.jar"
$ javac -cp "$CLASSPATH" Xi*.java
and does that necessity mean that there is a bug in the antlr4 package
on Stretch?
Thanks again,
Sam
--
A: When it messes up the order in which people normally read text.
Q: When is top-posting a bad thing?
() ASCII ribbon campaign. Please avoid HTML emails & proprietary
/\ file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.
Reply to: