#64 detect 64bit or 32bit environment and choose different JDK

Next Release
closed
nobody
None
5
2014-03-23
2012-01-08
No

Hi,
a nice new feature would be for the generated exe to detect 64-bit or 32-bit environment and choose an e.g. different bundled JDK.
This will be very useful since 64-bit OS is mainstream nowadays but most java apps with bundled SDK still use 32-bit java because
their is no other solution yet.

Discussion

  • for the time being, I create two different versions of my main application exe using launch4j. The first one e.g. main.exe uses a bundled x86 jre and the other e.g. mainx64.exe uses a budled x64 jre.
    Then, i use a small nsis script to detect x64 environment and launch the appropriate main application executable.

     
  • Another related addition would be to set memory options differently for x32/x64 e.g. for x32 we could use -Xmx1536M but for x64 we could use -Xmx4G

     
  • Grzegorz Kowal
    Grzegorz Kowal
    2014-03-23

    This detected and depending on target runtime (64-bit, 64/32-bit, 32-bit) the appropriate runtime is selected. The 32-bit memory limit is also applied.

     
  • Grzegorz Kowal
    Grzegorz Kowal
    2014-03-23

    • status: open --> closed