• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAR FILE

 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create a JAR file thru JAVA code? What should i do? can u expain with sample code

Thanks in Advance..!

Kala.
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the JarOutputStream class.

JarOutputStream Javadoc
 
alec stewart stewart
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can do this by
runtime.execute("jar cvf abc.jar *.*")
 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u, now i got the jar file, but the problem is in my code i have given
Manifest man=new Manifest();

this man obeject i am passing through the

JarOutputStream out = new JarOutputStream(stream, new Manifest());

the jar file is creatd , but when i c the propeties os the jar file, for the Manifest its empty, vat should i do.

can u plz hepl me
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!