?
Solved

how to make executable from my jars?

Posted on 2012-03-20
10
Medium Priority
?
281 Views
Last Modified: 2012-04-11
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..
0
Comment
Question by:pvinodp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 1002 total points
ID: 37741641
make it as single jar and placethe maifest file with in that
0
 

Author Comment

by:pvinodp
ID: 37741690
then what is the content of the manifest for the final jar?
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 37741704
just specify the main-class
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:pvinodp
ID: 37741769
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
 
LVL 26

Expert Comment

by:ksivananth
ID: 37741792
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 498 total points
ID: 37742286
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
 

Author Comment

by:pvinodp
ID: 37760062
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 37760406
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
 
LVL 26

Accepted Solution

by:
ksivananth earned 1002 total points
ID: 37769898
>>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
 

Author Closing Comment

by:pvinodp
ID: 37836075
thanks for your comments
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question