문제

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.
도움이 되었습니까?

해결책

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)

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top