I'm trying to export my program as a runnable JAR, everything ran fine in Eclipse. I've checked the following:
- Include all the jars in my Libraries under
Java Build Path
- Checked them all under
Order and Export
- When exporting, I selected
Package required libraries into generated JAR
- When I open the generated JAR, I can see all the other 3rd party JARs are in the root
However when I run my runnable JAR, I'm getting the following:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at ca.carillon.jnlp.Launcher.<clinit>(Launcher.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The only other way I got my runnable JAR to work is to select Extract required libraries into generated JAR
, however I don't want to extract all those 3rd party JARs, can someone tell me what else I'm missing in Eclipse?