how to make executable from my jars?

I have a 3 jars.
1. my.jar{ contains the main.class, manifest.mf }
   manifest.mf contains  class-Path: one.jar two.jar
2. one.jar
3. two.jar

To execute manually I have to do "java -jar my.jar"....
It works as all the 3 jars are co-located...
Is there any better way to package this.. so that a customer exeutes just one command and this is done. I dont want to give him a tar file which he has to un-tar to folder and then execut eth command. I know I can place this command in  shell script, but then I need better way than this.

I cannot install any third party software .. I am using redhat 5..
pvinodpAsked:
Who is Participating?
 
ksivananthConnect With a Mentor Commented:
>>The only way around that is first to UNjar everything and make a single jar from all classes

if this is the only way, isn't this I told in #37741641? ;)
0
 
ksivananthConnect With a Mentor Commented:
make it as single jar and placethe maifest file with in that
0
 
pvinodpAuthor Commented:
then what is the content of the manifest for the final jar?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
ksivananthCommented:
just specify the main-class
0
 
pvinodpAuthor Commented:
the main class will be inside the my.jar...
then how?
The content of present manfest.mf inside my.jar

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.)
Main-Class: com.ejbClient.omcrPing.OmcrPing
Class-Path: jbossall-client.jar omcrEjbClient.jar
0
 
ksivananthCommented:
0
 
CEHJConnect With a Mentor Commented:
make it as single jar and placethe maifest file with in that

You can only do that with special 'one jar' software. The only way around that is first to UNjar everything and make a single jar from all classes
0
 
pvinodpAuthor Commented:
Is it possible to pack the jars into a single file which is executable?
And it should be supported by redhat by default. I cannot install any new or third party packages.
0
 
CEHJCommented:
Is it possible to pack the jars into a single file which is executable?

Yes, do what i said above and set the Main-Class in the manifest
0
 
pvinodpAuthor Commented:
thanks for your comments
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.