Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems Shortcut JNLP

I have a problem with JNLP.

When a computer has two Java versions installed, 64 and 32 bits. The computer executes the version 32 bits by default.

And the shortcut is

C:\Windows\SysWOW64\javaws.exe -localfile 
    "C:\Users\Micro\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\43\b9706ab-6de97627"

How do I force the shortcut execute by C:/Windows/System32/javaws.exe independent the version of Java?

like image 726
Ricardo Pontes Avatar asked Nov 04 '22 01:11

Ricardo Pontes


1 Answers

The computer executes the version 32 bits by default.

Not exactly. It rather depends on the calling application.

Let's see two examples:

  1. Start cmd.exe (use WINDOWS+R and type cmd)

  2. run "java -version" and you get

    java version "1.7.0_03"
    Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
    
  3. Start cmd.exe via 32 bit program (e.g. total commander)

  4. run "java -version" and you get

    java version "1.7.0_03"
    Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
    Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)
    

As can try to use the stubs in windows\system32 and windows\syswow64 directly. The only change:

  • you can downgrade from 64bit to 32 bit using

    c:\Windows\Syswow64\java -version
    

The only way I know to elevate from 32 bit to 64 bit is to run the 64bit version explicitely using

    "c:\Program Files\Java\jre6\bin\java.exe" -version

This logic also applies to all other java commands using wrappers in windows\system, like javaws.

=> link to "c:\Program Files\Java\jre6\bin\javaws.exe"

like image 145
bebbo Avatar answered Nov 09 '22 14:11

bebbo