2

I am running a jnlp in OSX 10.8.2 with jre the jre version 1.7.0_11 and jnlp tag is set to run in 1.6 as:

<j2se version="1.6" href="http://java.sun.com/products/autodl/j2se">

or

<j2se version="1.6*" ...>

However, when the jnlp runs shows the following in the console: Java Web Start 10.11.2.21 Using JRE version 1.7.0_11-b21 Java HotSpot(TM) 64-Bit Server

When I run the same jnlp file in windows using jre 1.7 works fine, it loads with jre 1.7 and then download jre 1.6 and run on it.

Any ideas?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
pguzman
  • 105
  • 1
  • 1
  • 7

3 Answers3

1

The root cause:

  1. jnlp is set to only use java 1.6 otherwise download it from auto download site and installed automatically

  2. All java versions for mac but 1.7 were developed by Apple so they do not have autodownload url

  3. After 1.7 oracle is developing java for macs

  4. When I review the java preferences only found java 1.7

  5. Jnlp looks for java 1.6 and is unable to find it and try to autodownload and is unable to do it either, so the only option it has is run on java 1.7

To solve this we uninstall java 1.7 and then we use the following instructions to make 1.6 java default: http://support.apple.com/kb/dl1573

http://blog.nominet.org.uk/tech/2008/04/24/restarting-the-awt-native-event-thread/

http://support.apple.com/kb/HT5559

Then we had a problem with certificates but we did the following: https://stackoverflow.com/questions/11727955/the-digital-signature-is-not-trusted-java-will-not-allow-any-access-to-this-app

java-will-not-allow-any-access-to-this-app

Community
  • 1
  • 1
pguzman
  • 105
  • 1
  • 1
  • 7
1

Now, they told me they need java 1.7 as default.

So, I found that installing JDK 1.7 instead of JRE, it was fixed. I can have both versions and my jnlp is using jre 1.6 to run.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

And then I had to run the follwoing commands from http://support.apple.com/kb/HT5559:

sudo mkdir -p /Library/Internet\ Plug-Ins/disabled

sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled

sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

After run this, the java applet plug-in starts to work in Chrome and I can handle all versions of Java from Application/Utilities/JavaPreferences

pguzman
  • 105
  • 1
  • 1
  • 7
0

fix these links to get java -version pointing to 7

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm CurrentJDK
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/ CurrentJDK
sudo ln -s CurrentJDK 1.7
sudo ln -s CurrentJDK 1.7.0

you could create links to the old 1.6

sudo rm 1.6 1.6.0
sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents 1.6
sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents 1.6.0
bbaassssiiee
  • 6,013
  • 2
  • 42
  • 55