You can pack the XML Parser along with the Java Application you are shipping. The following steps show how to do this. I used the Apache’s Xerces and Xalan parsers for XML and XSLT as an example.
- Un-Jar the xerces.jar and xalan.jar into a temporary directory.
- Copy your Java application class files to the same directory. If you use packages in your code, copy the entire directory created after compilation of the Java Code.
- In the Meta-Inf information for the JAR file, give the following line:
Main-Class: MainClassFile
This will start the first class file which has to be executed by the JavaVirtual Machine.
- Now JAR the contents in the temporary directory (not the directory itself) into a .Jar file.
- Double click on the created .Jar File. This will load the application.