3

I need to distribute a Java application and I want an installer to install it in all cases.

I need to create an *.exe launcher that will check the installed JREs and

  1. if the required JRE isn't installed, show a window with a proper link.
  2. if required JRE is installed, launch the properly executable jar file.
JoshDM
  • 4,939
  • 7
  • 43
  • 72
Zharro
  • 819
  • 1
  • 11
  • 23

2 Answers2

5

I'm pretty happy with WinRun4J: http://winrun4j.sourceforge.net/

It's under active development and some improvements I suggested were quickly implemented.

The only thing that is currently lacking (from my point of view) is to specify a "relative" path to the JRE to allow bundling a JRE with the application.

To spare you the effort of reading the manual, this is what I do for my launcher:

Rename WinRun4j.exe to MyApp.exe, then:

rcedit /C MyApp.exe
rcedit /I MyApp.exe myapp.ico
rcedit /N MyApp.exe MyApp.ini

Put into a nice little batch file and there is no "manual" stuff to do.

You only need to do this once (and if your library path changes)

  • It looks like a tool that will solve a problem. But manual is so poor - I can't understand how to build an exe file. I've customized .ini file and chse an icon, what's next? Please help! – Zharro Mar 14 '13 at 14:43
  • @Zharro: You don't need to "build" and exe. You just rename the existing one and replace the icon (as explained in the manual). This is pretty well documented. See my edit –  Mar 14 '13 at 14:46
  • Thank you! But could you please help me a little bit more. Please answer this [http://stackoverflow.com/questions/15428347/how-to-fill-ini-file-for-creating-exe-for-java-app-with-libs-winrun4j] question. – Zharro Mar 15 '13 at 09:07
2

You could use JSmooth for example: http://jsmooth.sourceforge.net/

D.R.
  • 20,268
  • 21
  • 102
  • 205