Jim Idle schrieb:
> Johannes Luber wrote:
>> Hi!
>>
>> I've wanted to build ANTLR with the newest files, but when calling "ant"
>> on the command line I get a few errors. The root cause seems to be:
>>
>> " [myjavac] 1. ERROR in
>> /home/verequus/Arbeit/ANTLR/code/antlr/main/src/org/antlr/codegen/CodeGenerator.java
>> (at line 52)
>>   [myjavac]  import org.antlr.grammar.v3.ActionTranslator;
>>   [myjavac]         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>   [myjavac] The import org.antlr.grammar.v3.ActionTranslator cannot be
>> resolved"
>>
>> I called "ant clean", but it doesn't solve this problem. Do I still
>> somehow have an too old file lying around or does the ant build.xml miss
>> a breaking change amendment? Or do I have to compile a particular file
>> in advance?
>>   
> I don't think that the ANT script is at all up to date - perhaps we 
> should remove it unless someone is going to volunteer to maintain it? 
> One problem with it is that it does not know how to build 3.1 using 3.1, 
> which you are seeing here.
> 
> However, building using Maven is incredibly simple and you should use 
> this and no Ant, as I actively support the Maven build process.
> 
> I know that you use Linux and so your Linux distro may already contain 
> the correct version of Maven, but whether you use your distro's yum, 
> urpmi, rpm, or you download the install from the Maven web site, you 
> want to install Maven version 2.0.9 or above and make sure that the mvn 
> command is your login PATH. Same applies if you are using Windows though.
> 
> Just follow the install instructions at: 
> http://maven.apache.org/download.html to download and install for your 
> particular system.
> 
> Then cd to one of the source directories you want to build. You want to 
> be in your command prompt cd'd to the directory that contains the 
> pom.xml file. So, starting with say stringtemplate, cd there and type:
> 
> mvn
> 
> and watch the output. Then do the same Java runtime followed by the main 
> tool.
> 
> If you build the tool directly, Maven will work out that you don't have 
> the other jars and will download them from the ANTLR snapshot directory. 
> The process is all automatic, including that it knows how to find a 
> version of ANTLR 3.1 that it can use to build 3.1.2-SNAPSHOT - unless 
> you want to know how to configure Maven, all you need to know is to run 
> the mvn command while located in the directory that contains pom.xml.
> 
> Also, don't forget that if you just want the latest, rather than 
> building some local change, then you can just got to antlr.org/hudson 
> and download the latest source, jars, javadoc and view the latest 
> coverage, findbugs and so on.
> 
> 
> Jim

I've done the installation instructions  but I get this error:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
  /usr/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.


Unable to locate the Javac Compiler in:
  /usr/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.


When I run "mvn --version", I get:

Maven version: 2.0.9
Java version: 1.5.0
OS name: "linux" version: "2.6.25.20-0.1-default" arch: "i386" Family:
"unix"

With "echo $JAVA_HOME", I get:

/usr/lib/jvm/java

What could be wrong?

Johannes
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to