17

I am trying to build a JavaFX application (native bundle) for WinXP 32-bit systems.

I have deployed a WinXP 32-bit Virtual Machine. Have also installed JDK (jdk-8u65-windows-i586) and InnoSetup and Netbeans 8.0.2 ...

However while i am trying to package as an .EXE application i receive:

Exception: java.io.IOException: Cannot run program "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\iconswap2855415551655584734.exe": CreateProcess error=193, %1 is not a valid Win32 application
C:\Documents and Settings\Administrator\My Documents\Netbeans Projects\AffideaDicomRouterBasic1_0_0\nbproject\jfx-impl.xml:3415: The following error occurred while executing this line:
C:\Documents and Settings\Administrator\My Documents\Netbeans Projects\AffideaDicomRouterBasic1_0_0\nbproject\jfx-impl.xml:3438: The following error occurred while executing this line:
C:\Documents and Settings\Administrator\My Documents\Netbeans Projects\AffideaDicomRouterBasic1_0_0\nbproject\jfx-impl.xml:1465: The following error occurred while executing this line:
C:\Documents and Settings\Administrator\My Documents\Netbeans Projects\AffideaDicomRouterBasic1_0_0\nbproject\jfx-impl.xml:3093: The following error occurred while executing this line:
C:\Documents and Settings\Administrator\My Documents\Netbeans Projects\AffideaDicomRouterBasic1_0_0\nbproject\jfx-impl.xml:2055: Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
BUILD FAILED (total time: 35 seconds)

Is my setup ok? Am i missing anything else?

I thought that in order to build a JavaFX application for WinXP32 i should only:

  • Build it on a similar (WinXP32) machine
  • Use the X86 JDK edition

However this does not seem to be enough!

Alexander Rühl
  • 6,769
  • 9
  • 53
  • 96
thanili
  • 777
  • 4
  • 26
  • 57
  • Actually i am trying to build also some of the JavaFX samples packed with NetBeans and i am also receiving the same ERROR – thanili Oct 28 '15 at 09:30
  • I have also tried with JDK 7 32bit edition with no success. I am wondering what i have been missing... – thanili Oct 28 '15 at 09:51
  • 4
    Windows XP is not supported by current versions of JavaFX. (Or indeed by Microsoft any more.) – James_D Oct 30 '15 at 23:13
  • There is a [workaround](http://stackoverflow.com/a/21202600/159570) to install JavaFX 8 on Windows XP. – Joe Coder Nov 03 '15 at 03:49

3 Answers3

1

The question sounds like you are trying to package the jar archive (or all .class files) into an exe archive. My answer is based on that assumption and trying to explain and extend the answer from nextcard. I am sorry if I misinterpreted your question. Also I am sorry for the bad formatting regarding my links. I am not allowed to post more than one link. I will correct that as soon as I have ten reputation.

Java is not a compiled language. That implies that the .class files or the jar archive are not executable. Every Java program need to be started using a JIT (Just in time compiler) which is typically called java. The system is able to execute jar archives if you click on them because it knows it has to add "java -jar" before the filename to be able to do something.

If you want to have the java program as an system dependend executable you have to use an AOT (Ahead of time) compiler. Those produce real bytecode the system can interpret itself independend on a virtual machine java programs are normally running in. One other possibility is to wrap the jar with launch4j (already mentioned by nextcard)

Wrapper:

AOT-compiler:

  • vmkit.llvm.org
  • gcc.gnu.org/java/
  • www.excelsiorjet.com
Fjolnir Dvorak
  • 316
  • 3
  • 13
  • My question has to do with the native .exe packaging option which is offered by JavaFX (Netbeans IDE). This seem to work only with Win 64bit systems. Thanks! – thanili Oct 15 '16 at 09:52
0

try to build the .exe with launch4j.

you have to export your project as "runnable jar" (in eclipse).

In launch4j you then chose the output file and input file. You can even bundle a JRE path to it, or set a min/max JRE version.

nextcard
  • 21
  • 2
-1

what is the project runtime java version is it 32 bit ? if not u need to use 32 bit jdk to build the project.

Keaz
  • 955
  • 1
  • 11
  • 21