• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Java Question - Jar file which depends on another jar library?

Superwormy

Golden Member
I have a bunch of Java code, I can create an executable jar file with it. *BUT* that jar file needs to depend on three other jars:

smack.jar
smackx.jar
smackx-debug.jar


Right now when I run the jar file, it tells me:
Exception in thread "main" jara.lang.NoClassDefFoundError: /path/to/file/in/smack.jar
...


How do I get it to realize that those classes are in the other jars?
 
Include the other JARs in your classpath... I believe you can do it system-wide (environment variable) or on the command line

java -cp smack.jar;smackx.jar;smackx-debug.jar ProgramToRun
 
Back
Top