Java Web Start and 64-bit JVM

I have a Java SWT application that I am trying to run through Java Web Start. The 32-bit version works fine, but many people cannot run the 64-bit version. They receive an error message, cannot run the 64-bit library on the 32-bit JVM. I am looking for Google and StackOverflow and others, and cannot find an answer on how to start Web Start in a 64-bit JVM.

I tried using the JVM Options, (-d64, -J-d64) with no luck.

Is this possible, or is it just that I am limited to the 32-bit version (ideally 64 bit is best, since this application will analyze a lot of data from the log files so that they are displayed cleanly)? What do I need to change in my JNLP for this to work?

<?xml version = '1.0' encoding = 'windows-1252'?> <jnlp spec="1.0+" codebase="http://example.com/confluence/download/attachments/212175616/" href="LogMiner_64Bit.jnlp"> <information> <title>LogMiner 64 Bit</title> <vendor> TECH</vendor> <description>Parse Log messages </description> <shortcut online="true"> <desktop/> <menu submenu="FA"/> </shortcut> <offline-allowed/> </information> <menu>64Bit</menu> <security> <all-permissions/> </security> <resources> <java version="1.7+" java-vm-args="-J-d64"/> <jar href="LogMiner64.jar" main="true" download="eager"/> </resources> <application-desc main-class="com.logMiner.ui.LogMiner"/> </jnlp> 
+5
source share
1 answer

You can create one jnlp file that supports both architectures. For instance:

 <resources arch="amd64 x86_64"> <jar href="LogMiner64.jar"/> </resources> <resources arch="x86 i386"> <jar href="LogMiner32.jar"/> </resources> 

If necessary, the resource tag can also accept the os attribute, as in os="Linux" , os="Mac" and os="Windows"

That way you can have one jnlp file that will do the right thing with respect to native libs, no matter which OS and architecture the user is on.

See also How to distinguish 32-bit from 64-bit Java in jnlp files

+4
source

Source: https://habr.com/ru/post/1261342/


All Articles