B
Bryan
Hello all,
I'm having trouble executing a jar file I created using Eclipse. I
have two projects set up in Eclipse... one with all the main source
code (no Main classes) and another with a main class that utilizes code
from the other project. I created a jar of the first project and added
the jar to the build path of the second project and I can run the Main
class in the second project no problem. I then created a jar file of
the second project and included the Main class in the manifest. When I
try to execute this jar file from the command line I get the following
error:
% java -cp SourceCode.jar -jar Executable.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
/path/to/some/package/class
Both the source jar and the executable jar are in the current working
directory. Any clues as to why this isn't working?
Thanks!
I'm having trouble executing a jar file I created using Eclipse. I
have two projects set up in Eclipse... one with all the main source
code (no Main classes) and another with a main class that utilizes code
from the other project. I created a jar of the first project and added
the jar to the build path of the second project and I can run the Main
class in the second project no problem. I then created a jar file of
the second project and included the Main class in the manifest. When I
try to execute this jar file from the command line I get the following
error:
% java -cp SourceCode.jar -jar Executable.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
/path/to/some/package/class
Both the source jar and the executable jar are in the current working
directory. Any clues as to why this isn't working?
Thanks!