Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1 filter plugins not found if .jar is moved

closed-fixed
None
5
2006-04-05
2006-04-03
Jan Iven
No

While trying to package 'zeitline' for deployment (as
RPM), I stumbled acorss the following. Apparently
Zeitline is deeply attached to the directory it was
compiled in, even as '.jar', and forgets about its
Input filters if moved.

$ cd zeitline-0.1-src
$ make JAVA_HOME=/usr CFLAGS='-source 1.4' jar
## (this is using javac-1.5 from /usr/bin, gives lots
of warnings btw)
$ java -jar ./Zeitline.jar
## GUI comes up
## Event->Import has list of compiled-in filters.
$ mv ./Zeitline.jar /tmp
$ java -jar /tmp/Zeitline.jar
java.util.zip.ZipException: No such file or directory
## GUI comes up
## Event->Import dialog shows no filters. BAD

$ mv /tmp/Zeitline.jar .
$ cd /tmp
$ java -jar ~/zeitline-0.1-src/Zeitline.jar
java.util.zip.ZipException: No such file or directory
Exception in thread "AWT-EventQueue-0"
java.lang.NullPointerException
at
PluginLoader.getPluginsFromDir(PluginLoader.java:174)
at Zeitline.loadPlugins(Zeitline.java:1163)
at Zeitline.<init>(Zeitline.java:131)
at Zeitline.createAndShowGUI(Zeitline.java:419)
at Zeitline.access$000(Zeitline.java:80)
at Zeitline$1.run(Zeitline.java:1176)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at
java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Discussion

    • assigned_to: nobody --> floorshow73
     
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=1257478

    The problem came up when executing the JAR file from a
    different directory. The null pointer exception occurred
    when executing the JAR from a directory that did not contain
    a 'filters' subdirectory.