Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Nov 29, 2001

Packing an XML Parser with a Java Application


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.
  1. Un-Jar the xerces.jar and xalan.jar into a temporary directory.
  2. 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.
  3. 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 Java Virtual Machine.
  4. Now JAR the contents in the temporary directory (not the directory itself) into a .Jar file.
  5. Double click on the created .Jar File. This will load the application.
Venkatesh Balakumar
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date