Take the 2-minute tour ×

I am trying to link the sources with the ANTLR library I have included in a project within NetBeans 7.2. When I want to go to a source of a class (e.g. by Ctrl+Mouse Click) I only get to a genereated source file without actual implementation code. ("Showing generated source file. No sources are attached to class' JAR file.")

I added a new library via Tools -> Ant Libraries including the the current version of ANTLR ([ANTLR directory]\lib\antlr-3.4-complete.jar) and its sources ([ANTLR directory]\runtime\JAVA\src).

I then included that library in my Java Project via Properties -> Libraries -> Add Library...

I can use the library and everything compiles, but I cannot navigate to ANTLR's source files.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Got it working.

The path to the sources was not completely correct, as it should have been:

[ANTLR directory]\runtime\Java\src\main\java\ (contains org\antlr\runtime...)

NetBeans now can properly associate the sources with the classes, e.g.

org.antlr.runtime.Parser.java -> org\antlr\runtime\Parser.java

share|improve this answer
add comment

Your Answer


