Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX exe bundling for x86 windows systems


usually I deploy my Java apps as a bundle which contains the JVM, so there's no need to install a JVM on the system.
Btw: This is no jnlp applet, this is a normal Swing Application.
I did this using ant's fx:deploy. This already works for 64bit systems. My problem is, that I want to deploy this application to a 32bit system and don't get it to work.

Here's what I did:
I've set up a clean Windows 7 (32bit) instance and installed a 32bit JVM. Now i ran my ant script to build a bundled Java app and it built a App.exe.
But when I tried to start this exe by double clicking, I get the following message box
Failed to create JVM
If I click OK, I get another message box
Failed to launch JVM
After this the app is terminated.
I did not find anything searching the web relating to bundling for 32/64 bit systems.
So I would be very glad if someone can point me in the right direction.
Many thanks in advance!
Greetings, -chris-

like image 921
Chris Avatar asked May 15 '13 11:05

Chris


2 Answers

Looks like a known bug fixed for an upcoming JavaFX version (currently known as 2.2.40):

  • RT-25715 The Windows launcher generated by the packager fails to load msvcr100.dll on 32-bit OS
  • RT-22610 .exe created by fx:deploy can't be executed due to missing msvcr100.dll

On the bug case, the user mentions a work-around:

If I give a try to the workaround documented in RT-22610, which is to copy runtime\jre\bin\msvcr100.dll side to my application's launcher binary, it fixes it.

I think the bug is fixed in JDK 8, so another possible work-around is to download a JDK 8 early access release and use the packaging tools from there to package a Java 7 application (though I have never tried that and am not sure if it would work).

like image 89
jewelsea Avatar answered Oct 18 '22 22:10

jewelsea


Just a small modification to @jewelsea's Fix:

copying msvcr100.dll into the app/ folder instead putting it right next to the exe also works, and at least it is somewhat hidden away then.

like image 27
Heiko Haller Avatar answered Oct 18 '22 22:10

Heiko Haller