Question

i wrote an application with java , and i use JGoodies in my code . when i export jar file , that file doesn't run in another systems . how can i bundle my program with JGoodies jar files ?

Was it helpful?

Solution

There are essentially two ways to do this, but it all boils down to making sure that your classes and the JGoodies classes are both in the classpath when the user runs the application.

The first way is to simply distribute your jar file along with the JGoodies jar file, and any jar files that either of them depend upon. The user then must include all (both) of those jars in their classpath with, the '-cp' option to the java command line.

The second option is to re-bundle all of the classes into one big jar file (usually referred to as an 'uber-jar'). If your build uses Maven, or you can convert to Maven, you can use the Maven Assembly Plugin - http://maven.apache.org/plugins/maven-assembly-plugin/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top