CyprUS
CyprUS

Reputation: 4239

How to convert jar files into exe & rpm

I have the following jar files for my app:

DesktopApplication1.jar

Plus , i have used the some extra API's for my app , like jsoup, jexcelapi etc. There are about 7 api's in the lib folder.

How to make a EXE file & RPM file out of all these jar files?

P.S. I am a first timer. So take that into consideration.also, I have used Netbeans 6.8. So the main API is in \dist folder. And the API used is in \dist\lib folder.

thanks in Advance

Upvotes: 3

Views: 5843

Answers (6)

Michelle
Michelle

Reputation: 56

For creating .exe to run on Windows:

  1. Download launch4j from http://launch4j.sourceforge.net.
  2. build wrapper .exe through launch4j.
  3. Download innoSetup from http://www.jrsoftware.org/isdl.php.
  4. Build .exe as installer, the setup file, for user to download and install.

  5. Install rpm for linux: If your application used other native libraries, you need to download and install Linux native libraries. This is how we build rpm for our app.

Upvotes: 0

Andrew Thompson
Andrew Thompson

Reputation: 168825

Deploy the app. with Java Web Start. JWS Can make it easy to add other Jars to the apps. run-time class-path, avoiding the common problem with fat jar of violating the API's distribution license (when it says WTE 'you are allowed to distribute this in unaltered form..') and can provide the further benefit of only downloading the parts that the user requires (when the user requires them).

JWS has many other cool features like desktop integration (menu bars, start menu item), splash screens, automatic updates, support by the owners of Java, and compatibility with any platform for which Java is available.

Upvotes: 0

Harry Joy
Harry Joy

Reputation: 59660

Try InstallJammer. It provides what you want.

Upvotes: 0

p4553d
p4553d

Reputation: 818

Build your JAR with fatJar to include all the dependencies in it, and then make it executable with your favorite tool (I use Launch4j)

RPM is little bit different, since it is not executable, but package format. There are lots of tutorials, how you build it up.

Upvotes: 2

Sangeet Menon
Sangeet Menon

Reputation: 9905

You could make a BAT file a file with .bat(For windows) extension

Just open notepad and write the following text

java -jar DesktopApplication1.jar

Save the file as filename.bat(the .bat extension is important)

Place the .jar and .bat files together and just double click the .bat file every time you need to run the jar...

If you don't want to keep both together then give the absolute path of the jar in the .bat file

java -jar AbsolutePath/DesktopApplication1.jar

For a linux machine make a file with (.sh) extension rest of the procedure is same...

Upvotes: 0

Nirmal- thInk beYond
Nirmal- thInk beYond

Reputation: 12054

use jsmooth to make exe from jar

Upvotes: 5

Related Questions