• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAR file  RSS feed

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

I created a JAR file called Test.jar. Now there are some classes inside another jar and i have to use those classes inside Test.jar to make it a complete working jar. The main class is in Test.jar only.

I don't know how to include the other jars inside Test.jar.

Kindly provide your help in resolving this problem.

Regards,
Viay
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As such you do NOT need to embed the other jar files in your jar file. Placing the jar file in the correct path location itself would suffice!
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As such you do NOT need to embed the other jar files in your jar file.
In fact, placing the other jar files within the main jar file will not work. Just put the other files in the same directory and list them in the "Class-Path" entry of the manifest file. See http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest for more information on that.
 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.


Problem solved!!
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf for the information!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!