Menu

Problem compiling JabRef (missing antlr package)

Help
2015-07-30
2015-07-31
  • François Charette

    Dear JabRef developers,

    I have a checkout of Jabref (current upstream/master) in my Eclipse Luna
    workspace (as Gradle project) following the instructions at
    https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace.
    Now I am trying to compile it on Mac OS X but I ran into two difficulties:

    1) The steps "./gradlew generateSource" and "./gradlew eclipse" went fine.
    But in the next step when I ran "./gradlew assemble" I get an error during
    the phase compileJava due to missing antlr package:

    :compileJava/Users/xxx/dev/jabref/src/main/gen/net/sf/jabref/search/SearchExpressionLexer.java:6:
    error: package antlr does not exist
    import antlr.TokenStreamException;
    ...

    I assume that Gradle should normally manage that antlr compile dependency
    correctly. Any idea what causes this and how I can circumvent it? I tried a
    workaround by manually downloading the full antlr4 distribution and add it
    to the build environment but was not successful.

    2) I had another problem when trying to run JabRef from Eclipse (via
    JabRefMain) but it fails with this exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: AboutEvent
    This is strange because this class is natively provided by JDK8 on Mac via
    com.apple.eawt.AppEvent (in rt.jar) ...

    BTW the reason I am doing this is to investigate a bug in the latest 2.11
    beta version that was reported by a research team I am associated with, and
    I thought I could perhaps fix it and offer you a patch. I first wanted to
    check whether it can still be reproduced with the latest development
    version.

    I thank you in advance for any help you might provide!

    Regards,
    François Charette

     
  • Oliver Kopp

    Oliver Kopp - 2015-07-31

    I'll follow up on the mailing list, to keep information in one place. For the other readers, please subscribe to our development mailing list: https://lists.sourceforge.net/lists/listinfo/jabref-devel