|<<Options & Properties||Print Layout||Manifest Attributes>>|
$ java -jar one-jar-sdk-0.96.jar Extracting SDK... done. To build the "Hello One-JAR" example: $ ant hello To run the "Hello One-JAR" example: $ java -jar hello.jar To rebuild the SDK: $ ant sdkThis extracts a development project (also an Eclipse JDT project) which contains a directory tree suitable for building a One-JAR application.
Note: make sure to download an Ant distribution in order to be able to rebuild the
sdk. You can obtain the latest version of ant here:
run Ant from within an IDE such as Eclipse. You will also need a Java Runtime JRE 1.4 or later.
$ ant hello builds a simple One-JAR Jar file containing a single Main class, and a single Hello
class. The Main class is bundled into main.jar, the Hello class is bundled into hello.jar,
and the requisite One-JAR jar-file is constructed. Main invokes Hello(), which prints "Hello One-JAR".
Use this project as a starting point for your own development by editing the
hello target in the
build.xml file extracted above. Clone the
build.xml file, and strip
sdk target since you will not be rebuilding it as part of your application.