Menu

#83 CLASSPATH problems with executable JAR

open
None
5
2007-01-05
2006-11-01
No

Reported by hjdrabkin:

tejano:/applications/memoranda1.0-rc3-20060703/build] hjd%
java -jar memoranda.jar
Exception in thread "main"
java.lang.NoClassDefFoundError:
snoozesoft/systray4j/SysTrayMenuListener
at java.lang.ClassLoader.defineClass1(Native
Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at
java.security.AccessController.doPrivileged(Native Method)
at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at net.sf.memoranda.Start.main(Unknown Source)

I am running Tiger with java 1.5

Discussion

  • Alex Alishevskikh

    Logged In: YES
    user_id=571786

    It looks like not OSX-specific, but a common problem when
    Memoranda is launched from executable JAR-file directly. It
    is a packaging issue (a bug in Ant buildfile??) with CLASSPATH.

    As a workaround I can suggest to put all Memoranda extra
    libraries (JARs from "lib" directory) into the CLASSPATH
    before starting. It is what a startup script (sh or bat) does.

    Though, I highly recommend to use startup scripts if possible.

     
  • Alex Alishevskikh

    • priority: 8 --> 5
     
  • mark_k

    mark_k - 2006-11-15

    Logged In: YES
    user_id=1636967
    Originator: NO

    This may be related - textur mentions fixing the classpath when building memoranda.jar, and that the build.xml might have been a bit borked.

    https://sourceforge.net/forum/message.php?msg_id=3968574

     
  • Alex Alishevskikh

    • summary: systray4j: NoClassDefFoundError in MacOS X --> CLASSPATH problems with executable JAR
     

Log in to post a comment.