Is there an easy way to export a Java project including all of its external dependencies to a standard .jar file?
I have developed an SDK that uses several Apache libraries and I would like to be able to ship this project as a single jar. The answers I have found thus far to this question require the project to be packaged as a Runnable jar, and does not apply to this project which has no main class.
The rest of the answers I have found assume familiarity with Ant or Maven to accomplish this task, and I have no background with either. There are several scripts out there but I don't understand how I would use/modify them, or what I would to run the script and get a result.
Any answer that can provide more background into how exactly a user with no background with Ant or Maven would do these tasks is greatly appreciated.
For more background information I have trying to combine the following libraries into one called JetstreamSDK.jar
commons-codec-1.6.jar
commons-configuration-1.9.jar
commons-io-2.4.jar
commons-lang-2.6.jar
commons-lang3-3.1.jar
commons-logging-1.1.1.jar
httpclient-4.2.5.jar
httpcore-4.2.4.jar
JetstreamSDK-Java.jar
jibx-bind.jar
jibx-extras.jar
jibx-run.jar
xpp3.jar
解决方案
1.) First compile your project
2.) Right click on your PROJECT -> Export -> Java -> Runnable jar
3.) You will get a Dialog box, there select the class name (in which your main method resides)
4.) Give the export destination
5.) In library handling(radio button): select your desired option(all are self descriptive)