Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Make Application installable

 
Mahendra Darwatkar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
How can I make my application installable?.. I am having lot of program. If i want to run on other computer i have to copy all class files and do all the setting required to that computer. I am interested to make one executable like SETUP to install my application.
Any body can help on my this problem?
Waiting for reply ..
Mahendra
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't bother with setup, but do package your stuff in jars. Stick in a Manifest file with a Main-Class attribute so you can just execute it with java -jar myjar.jar.
- Peter
 
gsm gsm
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my application has a set of classes in a folder and the application is run like:
java class1 option1 option2 ...etc
also, i have another class which also has main method and it is run as:
java class2 option1 ...etc
now how can i distribute this application in the form of a jar file. since i have 2 main classes, should i make 2 jar files so that
the application can be run as
java -jar jar1.jar option1 option2 ...etc
java -jar jar2.jar option1 ....etc
thanks in advance..
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gsm gsm:
should i make 2 jar files so that
the application can be run as
java -jar jar1.jar option1 option2 ...etc
java -jar jar2.jar option1 ....etc
thanks in advance..

Yes. I made a server.jar and a client.jar with the necessary files in each.
-BJ
 
gsm gsm
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lets say i have a total of 7 classes.
i have a main class which calls 3-4 other classes (say c1 c2 c3 c4)
I have another main class which also makes use of c1 c2 and c3
so i have to make 2 jars with the classes c1 c2 c3 repeating in each jar.
is that right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic