How to ensure jnlp runs on 64-bit jvm

I have a JNLP applet that runs on a 64-bit computer with 32 and 64 bit JVMs installed. JNLP must run on a 64-bit JVM for it to work properly. Is there a way to force the use of a 64-bit JVM?

+7
source share
3 answers

Use the -d64 parameter of the virtual machine to allow the virtual machine to start with 64 bits. Another way is simply not to start. Not friendly, but to work. In console mode, print:

 Error: This Java instance does not support a 32-bit JVM. Please install the desired version. 

-d64 supported since 1.5.0

+1
source

See here: How do I know if I work in a 64-bit JVM or 32-bit JVM (from within the program)?

You can use this to detect a 64-bit JVM, and if not, you will see an error message.

0
source

If you use a 64-bit browser, then the 64-bit JVM is used. If you are using a 32-bit browser (which is currently the default for most browsers), the 32Bit JVM is used. So, for example, firefox and chrome are only 32Bit versions (of course, there is a test / develop version there, but nothing is official). Microsoft IE is one of the few offers of both versions.

You cannot guarantee that jnlp will work in a 64-bit environment. However, you can provide in your code an applet that was running in the correct environment:

 String architecture = System.getProperty("os.arch"); if(architecture.equals("i386") || architecture.equals("i686")){ architecture = "x86"; } else if(architecture.equals("amd64") || architecture.equals("universal")){ architecture = "x86_64"; } 
0
source

All Articles