JSmooth question on bundling a JRE

Posted by chama on Stack Overflow See other posts from Stack Overflow or by chama
Published on 2010-03-15T15:25:57Z Indexed on 2010/05/02 12:27 UTC
Read the original article Hit count: 281

I'm trying to bundle a JRE with my jar file so that I can run my application on any windows computer, regardless of if it has Java or not. The jsmooth manual says:

For the option to work correctly, you have to put a JRE in a directory near the EXE (generally in a subdirectory called "jre" or whatever). Once the exe is generated, it will FIRST try to locate the JRE at the location mentioned. If it can't be found there, then it will fallback in the normal jre look-up mode (search for a jre or a jdk in the Windows registry or in commonly-used environment variables). There is no JVM-version check when using a bundled JRE, as the packager is supposed to bundle a suitable JVM for the application.

Does this mean that the jre subfolder should be included in the jar, be its own separate jar, or put in the folder that comes along with the exe? If it is supposed to be in a folder with the exe, how can I specify the relative path to the jre subfolder?

My directories are as follows:

setup/

-jre/

-myprogram.exe

I tried using ..\jre, .\jre, ..\setup\jre in the GUI screen, but none of them worked.

Any ideas or leads would be greatly appreciated. Thanks so much!

EDIT: when I tried jre (and ..\jre I think), I got the following error message from windows when I tried running it "MyProgram.exe has stopped running." When I look at the problem details, it says APPCRASH and the fault module name is jvm.dll

© Stack Overflow or respective owner

Related posts about java

Related posts about Windows