Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to execute Zeo Decoder Viewer (a Java application) on Linux, and I'm not sure how I'm supposed to do this.

I've put the program and required libraries (all in jar files) in /opt/zeo/ directory, and I try this:

miernik@przehyba:/opt/zeo$ ls
appframework-1.0.3.jar  joda-time-1.6.jar  swing-worker-1.1.jar  ZeoDecoderViewer.jar
miernik@przehyba:/opt/zeo$ java -jar ZeoDecoderViewer.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/application/SingleFrameApplication
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.application.SingleFrameApplication
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 12 more
Could not find the main class: com.myzeo.viewer.ZeoDecoderViewer. Program will exit.
miernik@przehyba:/opt/zeo$ 

Am I doing something basic horribly wrong?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Normally the answer would involve classpaths and the -cp argument, but the documentation for this particular project makes the issue clear:

Extract the jar file and lib folder to a directory of your choosing.

Those other three jars are expected to be in a subfolder called lib, not in the same directory as the "main" jar.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.