FindBugs scanning external jars - java

I am using the following link to create an ant script to run findbugs on a web application:
Chapter 6. Using the FindBugs™ Ant task
I am setting the auxClasspath parameter to my jars folder.
But when i run the task using ant findbugs from the command prompt, it takes a very long time(~45 minutes) and the output xml contains analysis of the jars in the auxClasspath as well as my source code.
I want only my source code to be analyzed.
This is the code in my build.xml:
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<property name="findbugs.home" value="C:/Software/FindBugs" />
<target name="findbugs" >
<echo message="Finding Bugs From ${basedir}/src/java"/>
<findbugs home="${findbugs.home}"
output="xml:withMessages"
outputFile="${basedir}\findbugs.xml"
stylesheet="fancy-hist.xsl"
timeout="6000000"
jvmargs="-Xmx1200m">
<auxClasspath path="${basedir}/Jars/*.jar" />
<sourcePath path="${basedir}/src/java"/>
<class location="${basedir}/build/myApp-1.0.jar" />
</findbugs>
</target>
I have added findbugs-ant.jar to lib of my ant installation.
The findbugs directory exists.
Other information:
IDE: Netbeans 7.3
OS: Microsoft Windows XP
Ant Version: 1.8.4
Find Bugs Version: 2.0.2
Update
If i leave out this line:
<auxClasspath path="${basedir}/Jars/*.jar" />
I get my desired output(i.e. analysis of only my source code).
But it raises a warning:
[findbugs] The following classes needed for analysis were missing:
[findbugs] javax.servlet.http.HttpServlet
[findbugs] javax.servlet.http.HttpServletRequestWrapper
[list continues]....
Any idea, why find bugs is analyzing jars which it should not analyze(according to the documentation)

I tried to track which Jars are being used in the source code.
In the findbugs xml output, i found a line: ${basedir}\Jars\antlr-2.7.2.jar
The findbugs analysis report showed that all the other jars(except antlr-2.7.2.jar) were missing.
There were no more auxClassPath entries. Solved this by specifying each class path entry in a different line.
If anyone has any better ideas, kindly contribute.

I used the following auxClasspath settings to pull in all my jars in my lib folder and all the jars in directories under my lib folder.
<auxClasspath>
<fileset dir="${lib.dir}">
<include name="*/**"/>
<include name="*.jar"/>
</fileset>
</auxClasspath>
Place it inside the findbugs tag.

Try to remove this line
<class location="${basedir}/build/myApp-1.0.jar" />
Now to try to analyze both jar and source files, that's it takes so long time.
This line is needed and used to find a class if it encounters during analysis of your source.
<auxClasspath path="${basedir}/Jars/*.jar" />
Maybe to can limit it to only really needed jars, not all in the folder.

Related

Ant jar task fails after wsimport task

An Ant build executes wsimport prior to creating a jar which includes the generated classes. After upgrading various libraries in the project, to include jaxws, the task which creates the jar fails. The reported error is "Cause: the class org.apache.tools.ant.taskdefs.Jar was not found"
I'm upgrading an old project to use newer versions of various libraries. I've been gradually upgrading the libraries in the project. I perform an Ant build each time to isolate any compile time errors. Thus far the upgrades haven't had a major impact, though the libraries I've replaced are things like logging, e-mail, and etc.
Now I've reached the jaxws libraries. We're coming from version 2.1 and going to 2.2.7. After a few cycles of upgrading the libraries and updating the build file with newer versions, the deployed WAR seems to function correctly as the WSDL is responding.
As part of the build process the service is deployed. Subsequently an Ant task performs wsimport to generate Java classes corresponding to the WSDL. The generated classes are then used to create a jar.
It is here that the process now breaks with an exception from Ant. The first visible exception is "java.lang.ClassNotFoundException: org.apache.tools.ant.util.DateUtils". Running the process again in verbose mode generates "Problem: failed to create task or type jar" as an earlier exception in the trace.
I've fiddled with things like setting ANT_HOME per a post involving jaxb. I've also tried different JDKs - open vs Oracle. Changing various classpath entries in the build file hasn't had a positive effect.
What I have discovered is that I can execute each task independently in the proper sequence. The jar task normally has a depends statement involving the wsimport task. In prior use this worked fine. Now it seems as though the hand-off between the tasks is causing something to break.
I did try integrating the wsimport execution into the jar task. No change. I can't seem to narrow down whether the issue is with the wsimport task, the jar task, or some underlying environment configuration. It's especially strange as various other tasks in the build prior to this point work just fine.
The environment is RHEL 7, open JDK 1.7, ant 1.9.4. I also have an Oracle JDK 1.8 available.
build.xml:
<path id="jaxws.classpath">
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${jar.dir}">
<include name="jaxws-tools.jar"/>
</fileset>
</path>
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="jaxws.classpath"/>
</taskdef>
<path id="processing.service.classpath">
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${jar.dir}">
<include name="activemq-core-5.4.3.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
<include name="jaxrpc.jar"/>
<include name="jaxws-rt.jar"/>
<include name="jaxws-tools.jar"/>
<include name="jms.jar"/>
<include name="jsr181-api.jar"/>
<include name="policy.jar"/>
<include name="slf4j-api-1.7.26.jar"/>
</fileset>
</path>
<target name="generate-processing-client" depends="setup">
<waitfor maxwait="60" maxwaitunit="second">
<http url="${serviceurl}?wsdl"/>
</waitfor>
<wsimport debug="true" verbose="true" keep="true" package="x.x.x.service.processing.client" destdir="${build.classes.dir}" wsdl="${serviceurl}?wsdl">
</wsimport>
</target>
<target name="jar-processing-client" depends="generate-processing-client" unless="skip.service.clients">
<jar basedir="${build.classes.dir}" destfile="${jar.dir}/agard-processing-client.jar" includes="x/x/x/service/processing/client/**"/>
</target>
Stacktrace:
jar-processing-client:
Caught an exception while logging the end of the build. Exception was:
java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils
at org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:330)
at org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:177)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2087)
at org.apache.tools.ant.Main.runBuild(Main.java:872)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.util.DateUtils
at java.net.URLClassLoader$1.run(URLClassLoader.java:360)
at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
... 7 more
There has been an error prior to that:
/home/x/git/x/etc/ant/services/processing.xml:132: Problem: failed to create task or type jar
Cause: the class org.apache.tools.ant.taskdefs.Jar was not found.
Action: Check that the component has been correctly declared
and that the implementing JAR is in one of:
-/usr/share/ant/lib
-/home/x/.ant/lib
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
It may just be a typographical error in the build file or the task/type declaration.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
I've also encountered errors relating to the manifest when I build the entire project. The jar task doesn't define a manifest. Adding manifest entries to the jar task seemed to remove that as an issue. When I execute only the jar task I receive the jar taskdef error above.
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.util.DateUtils
at java.net.URLClassLoader$1.run(URLClassLoader.java:360)
at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
... 7 more
There has been an error prior to that:
/home/x/git/alerting/build.xml:114: The following error occurred while executing this line:
/home/x/git/alerting/build.xml:63: The following error occurred while executing this line:
/home/x/git/alerting/etc/ant/services/processing.xml:132: Could not find default manifest: /org/apache/tools/ant/defaultManifest.mf
Update
I reverted several of the jaxws and jaxb libraries. This returned the build to a working state. I've subsequently added the newer versions of the libraries, each time running the build process. I identified the need to include items like jaxb-core-2.2.7, which oddly aren't available in the jaxws-ri-2.2.7 distribution. There are still issues with the build process as I proceed with upgrading the libraries. The current stack I'm receiving is as follows:
Caused by: java.lang.IllegalAccessError: tried to access field com.sun.xml.bind.marshaller.SAX2DOMEx.nodeStack from class com.sun.tools.ws.wsdl.parser.DOMBuilder
at com.sun.tools.ws.wsdl.parser.DOMBuilder.comment(DOMBuilder.java:136)
It seems very strange that these errors are occurring during what should be a rather simple jar task.
Update
I've been placing the new libraries in the same folder as the old ones. I thought this may cause an issue with the classpath. I decided to isolate the new libraries from the old by placing them in a separate directory. I copied in the other libraries I haven't yet updated. The issue with Ant still persists. I've isolated it to the wsimport task. I'm wondering if it isn't something to do with the classpath set by the taskdef.
Update
I've been digging through the wsimport Ant task sources. The closest thing I've seen thus far in the call hierarchy resides in WsTask2.java. They're changing the classloader. In tracking this down, it appears that the classpath should be that of the Ant tool. There are cases of reading the java.class.path and few which alter it.
It's still unclear why I'm experiencing this issue in my environment with these versions of software. I looked at the history of this project on github and didn't see any obvious sign of a bug related to this issue being fixed.
ClassLoader old = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
try {
ok = runInVm(getCommandline().getJavaCommand().getArguments(), logstr);
} finally {
Thread.currentThread().setContextClassLoader(old);
}
Update
I've confirmed the issue is not specific to my environment. I moved the source code and libraries to another server which is installed with RHEL 6. The build still fails with the same error.
I went back to my development machine and attempted to replace the JAXWS libraries with a higher version. I tried 2.2.8, 2.2.10, and 2.3.0. Of course with 2.3.0 I had to change to a 1.8 JDK. The issue persists.

Exclude a file or package from the Clover report using ant build script

I am using a short ant script to generate my Clover coverage report. I want to exclude certain source files from the report. The code is already fully instrumented, it's not feasible for me to exclude the file during instrumentation.
Excerpt of the ant build xml (trimmed):
<project name="Clover Coverage" default="clover.report" basedir="${basedir}">
<target name="clover.report">
<clover-report initstring="${cloverdb}" >
<current outfile="${reportdir}" title="${title}" >
<format type="html"/>
<sourcepath>
<pathelement path="${srcdir1}"/>
</sourcepath>
</current>
</clover-report>
</target>
</project>
I've tried to exclude this using fileset, but when I do this, Clover gives an error message saying that no coverage info could be found. But if I remove the fileset then it works fine.
My attempted fix that doesn't work:
<current outfile="${reportdir}" title="${title}" >
<format type="html"/>
<fileset dir="${srcdir1}">
<exclude name="**/ExcludeThisClass.java"/>
</fileset>
<sourcepath>
<pathelement path="${srcdir1}"/>
</sourcepath>
</current>
Is the exclusion of files from the Clover report not possible?
Please run your Ant with debug logging (ant -d). The <clover-report> task should print more details then. The most probably you instrumented and/or executed your source code not at once but in several build/test sessions.
And it's probable that Clover rejected some of recording files because it found them out of date.
See these knowledge base articles:
https://confluence.atlassian.com/cloverkb/ignoring-coverage-recording-files-300816998.html
https://confluence.atlassian.com/cloverkb/no-coverage-recordings-found-no-report-will-be-generated-611812757.html

ZIP from Ant build fails to extract from Cornerstone LMS CSOD

I have an Ant build which ends with a simple ZIP task:
<target name="packModule" description="Pack the SCO ZIP">
<zip destfile="${deploy.dir}/sco_${module}_${lang}.zip" basedir="${deploy.dir}" />
</target>
This generates a ZIP file which gets deployed fine on many LMS, including SCORM Cloud. But on CSOD, it throws this error:
Error: Failed to unzip: Zip64 Extended information found but version is not valid
Right now, I have to manually unzip the package generated by Ant Build and rezip using 7-Zip to fix the issue. Please help me resolve this. Am on Windows7, using Ant version: apache-ant-1.9.6 and my JRE is jre1.8.0_45
Thanks to #VGR, zip64Mode="never" fixed the issue. I confirm it works fine on CSOD and doesn't require a manual unzip-zip routine. The final task looks like this:
<target name="packModule" description="Pack the SCO ZIP">
<zip zip64Mode="never" destfile="${deploy.dir}/sco_${module}_${lang}.zip" basedir="${deploy.dir}" />
</target>

FindBugs refuses to find bcel jar on classpath

For the life of me, I am trying to get FindBugs (2.0.1) to run as part of my command-line Ant build. I downloaded the FindBugs JAR and extracted it to /home/myuser/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1:
As you can see in the screenshot, under /home/myuser/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1/lib there is a JAR called bcel-1.0.jar, and if you open it, you can see that I have drilled down to a class called org.apache.bcel.classfile.ClassFormatException. Hold that thought.
I then copied /home/myuser/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1/lib/findbugs-ant.jar to ${env.ANT_HOME}/lib to make it accessible to the version of Ant that is ran from the command-line (instead of the Ant instance that comes built-into Eclipse).
My project directory structure is as follows:
/home/myuser/sandbox/workbench/eclipse/workspace/myapp/
src/
main/
java/
test/
java/
build/
build.xml
build.properties
gen/
bin/
main/ --> where all main Java class files compiled to
test/ --> where all test Java class files compiled to
audits/
qual/
staging/
Inside build.xml:
<project name="myapp-build" basedir=".." default="package"
xmlns:fb="antlib:edu.umd.cs.findbugs">
<path id="findbugs.source.path">
<fileset dir="src/main/java">
<include name="**.*java"/>
</fileset>
<fileset dir="src/main/test">
<include name="**.*java"/>
</fileset>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
uri="antlib:edu.umd.cs.findbugs"/>
<!-- Other Ant target omitted for brevity. -->
<target name="run-findbugs">
<!-- Create a temp JAR that FindBugs can use for analysis. -->
<property name="fb.tmp.jar" value="gen/staging/${ant.project.name}-findbugs-temp.jar"/>
<echo message="Creating ${fb.tmp.jar} for FindBugs."/>
<jar destfile="gen/staging/${ant.project.name}-findbugs-temp.jar">
<fileset dir="gen/bin/main" includes="**/*.class"/>
<fileset dir="gen/bin/test" includes="**/*.class"/>
</jar>
<echo message="Conducting code quality tests with FindBugs."/>
<fb:findbugs home="/home/myuser/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1"
output="html" outputFile="gen/audits/qual/findbugs.html" stylesheet="fancy-hist.xsl" failOnError="true">
<sourcePath refid="findbugs.source.path"/>
<class location="${fb.tmp.jar}"/>
</fb:findbugs>
</target>
<target name="echoMsg" depends="run-findbugs">
<echo message="The build is still alive!!!"/>
</target>
</project>
But when I run ant -buildfile build.xml echoMsg from the command-line, I get an error in FindBugs:
run-findbugs:
[echo] Creating gen/staging/myapp-build-findbugs-temp.jar for FindBugs.
[jar] Building jar: /home/myuser/sandbox/workbench/eclipse/workspace/myapp/gen/staging/myapp-build-findbugs-temp.jar
[echo] Conducting code quality tests with FindBugs.
[fb:findbugs] Executing findbugs from ant task
[fb:findbugs] Running FindBugs...
[fb:findbugs] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/bcel/classfile/ClassFormatException
[fb:findbugs] Caused by: java.lang.ClassNotFoundException: org.apache.bcel.classfile.ClassFormatException
[fb:findbugs] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[fb:findbugs] at java.security.AccessController.doPrivileged(Native Method)
[fb:findbugs] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[fb:findbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[fb:findbugs] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[fb:findbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[fb:findbugs] Could not find the main class: edu.umd.cs.findbugs.FindBugs2. Program will exit.
[fb:findbugs] Java Result: 1
[fb:findbugs] Output saved to gen/audits/qual/findbugs.html
echoMsg:
[echo] The build is still alive!!!
Here's what has me amazed:
Even with failOnError="true", FindBugs is not halting the build even when this runtime exception is encountered
The last piece of output "Output saved to gen/audits/qual/findbugs.html" is a lie! There is nothing in gen/audits/qual!
The bcel-1.0.jar is absolutely under FindBugs home, just like every other JAR in the lib/ directory.
Please note: the findbugs-ant.jar is definitely copied to ANT_HOME/lib; otherwise I would be getting a failed build complaining that it couldn't find the Ant tasks. As a sanity check, I went ahead and did this (I deleted the findbugs-ant.jar from ANT_HOME/lib and got a failed build). This build doesn't fail (it succeeds!). It just doesn't run findbugs.
Can anyone spot what is going on here? Thanks in advance!
You can debug where BCEL is being loaded from using the -verbose:class argument to the jvm.
To pass this argument to the jvm running findbugs, use the jvmargs flag on the find bugs plugin
jvmargs
Optional attribute. It specifies any arguments that should be
passed to the Java virtual machine used to run FindBugs. You may need
to use this attribute to specify flags to increase the amount of
memory the JVM may use if you are analyzing a very large program.
How did you populate the find bugs lib jar? When I download findbugs.zip, I get a lib directory which looks very different than what you show. In particular, mine contains a bcel with a version of 5.3, not 1.0 as you show.
Funny thing because I am using the same version of Findbugs and the jar file is named bcel.jar not bcel-1.0.jar. I am also running Findbugs from an Ant script. As crazy as it might sound, try to download the Findbugs once again, unpack it in the place of your current one and run your script once again.
My guess is that you actually have BCEL in the classpath twice. And the file is being loaded from the jar outside the FindBugs library. Then, when FindBugs tries to load the jar, it finds the BCEL in the FindBugs library and cannot load it, because it's already loaded.
The solution would be to find where else BCEL exists in the classpath and remove it.
You might have to define a AuxClasspath to include the classpath that your <javac> task used when compiling your class files.
You don't show how the compile took place, so I am assuming your created a compile.classapath classpath reference:
<javac destdir="gen/bin/main"
srcdir="src/main/java"
classpathref="compile.classpath"/>
<fb:findbugs home="/home/myuser/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1"
output="html" outputFile="gen/audits/qual/findbugs.html" stylesheet="fancy-hist.xsl" failOnError="true">
<auxClasspath refid="compile.classpath"/>
<sourcePath refid="findbugs.source.path"/>
<class location="${fb.tmp.jar}"/>
</fb:findbugs>
I don't see from your Ant script that bcel is landing on any classpath that the findbugs task would be able to load it from. You might want to try making your taskdef explicitly include everything findbugs needs.
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
uri="antlib:edu.umd.cs.findbugs">
<classpath>
<fileset dir="/home/java/repo/umd/findbugs/2.0.1/findbugs-2.0.1">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
most classpath problems you can debug with tattle. it will report you all jars in your project. all duplicated classes etc. saved me a lot of time.
there is also ant task ready: http://docs.jboss.org/tattletale/userguide/1.2/en-US/html/ant.html

Why is my ANTLR grammar file for Java not compiling?

I have been given an ANTLR grammar for a subset of the Java compiler known as the static Java compiler. I am trying to extend the grammar to include more of Java's features, for instance, I just added the grammar for For Loops.
Using Eclipse and an ANTLR plugin, I then did 'Compile ANTLR grammar'. Instead of compiling it produced two errors on the first bit of code:
grammar ExtendedStaticJava;
options { backtrack=true; memoize=true; }
#header
{
package sjc.parser.extended;
import java.math.BigInteger;
/**
* Extended StaticJava parser.
* #author <myname>
*/
}
// the rest of the grammar has been excluded.
The first error is on line 1: 'Unexpected Token: grammar'
The second error is on line 5: 'Unexpected char: #'
Why does it not recognize this basic ANTLR syntax? My first thought was that I was missing something in the classpath, but I went to the project's properties and made sure that the following JARs were included under Libraries:
antlr-2.7.7.jar
stringtemplate-3.2.1.jar
antlr.jar
antlr-runtime-3.0.1.jar
Any ideas or suggestions?
antlr-2.7.7.jar is wrong: your grammar is in ANTLR v3+ syntax. Remove all:
antlr-2.7.7.jar
stringtemplate-3.2.1.jar
antlr.jar
antlr-runtime-3.0.1.jar
from your project/classpath and only stick this ANTLR v3 JAR in it (which contains everything you need: runtime, stringtemplate, the works!).
Good luck!
EDIT
Personally, I do my IDE integration with an Ant build script. I generate a lexer and parser like this:
<target name="generate.parser" depends="init" description="Generates the lexer, parser and tree-walker from the grammar files.">
<echo>Generating the lexer and parser...</echo>
<java classname="org.antlr.Tool" fork="true" failonerror="true">
<arg value="-fo" />
<arg value="${main.src.dir}/${parser.package}" />
<arg value="${parser.grammar.file}" />
<classpath refid="classpath" />
</java>
<!-- snip -->
</target>
and the classpath refid looks like:
<path id="classpath">
<!-- snip -->
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
and the lib/ directory contains the ANTLR v3 JAR (no other ANTLR JARs! (sorry for hammering on that :)))
You have probably installed the AntlrEclipse plugin. This indeed uses Antlr 2.7.something. There is however a plugin available that works with v3, Antlr IDE. This plugin is a little bit more advanced as it allows you to configure the Antlr version (3+) and can show a railroad view and has an interpreter.
Note If you are using Eclipse Juno, you will need to install the DLTK from the Indigo repositorties, as 4.0.0 is to new for the antlr plugin
I had this issue as well.
At some point during my attempts to get antlr running I had added some version of the jar file to my classpath windows environment variable. I removed this entry, and it resolved my issue.

Categories

Resources