Hello Guest

[FIXED] macosx latest java update breaks lwjgl applets (browser just blank)

  • 8 Replies
  • 9810 Views
After installing the latest macosx java update (1.6.0_26) lwjgl applets no longer works :(

I initially tried on 10.6, but later upgraded to 10.7 with same result.

Trying the demo applet (lwjgl.org/applet) gives this in the java console:
Code: [Select]
LWJGL: 2.7.1 / macosx
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: NVIDIA GeForce 320M OpenGL Engine
GL_VERSION: 2.1 NVIDIA-7.2.9

glLoadTransposeMatrixfARB() supported: true
Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03-383-11A511 Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/pelle2269 frames 2 in 5.0 seconds = 453.8
2381 frames 2 in 5.0 seconds = 476.2
2361 frames 2 in 5.0 seconds = 472.2

The log looks OK, but nothing shows up in the browser, just blank white. I tried both Safari and Chrome. I'm running on a MacBook Air, but saw the same issue on several other models in an electronics store.

I should also note that before updating java everything worked fine.

For the record I also tried firefox, and switching to 32 bit java, all with the same results :S

*

Offline kappa

  • *****
  • 1319
yeh, this is a known issue, its because OS X 10.7 Lion has switched to java plugin2 by default for Safari. A workaround is to use a LWJGL Window (non embedded or parented) with applets.
« Last Edit: July 30, 2011, 11:58:50 by kappa »

*

Offline princec

  • *****
  • 1933
    • Puppygames
I thought it had switched to "no java at all" :) Or at least that's what my Steam users are telling me when they upgrade :S

Cas :)

*

Offline kappa

  • *****
  • 1319
Java isn't installed by default on OS X 10.7 Lion, however if any Java app or applet tries to run then there is a built in mechanism that will stop the launch, download and install java automatically and then relaunch the app/applet. So basically the first time a Java app is run on Lion there will be a small pause while Java installs.

Apple have started recommending developers to start bundling JRE's with their applications as the system JRE may not be available in future releases of OS X. They will shortly be creating tools to make this easy for developers. The advantage of bundling a JRE means you can include your app on the Mac App Store (i.e. as long as it doesn't depend on the System JRE).
« Last Edit: July 30, 2011, 12:02:23 by kappa »

I experienced this also on macs with 10.6 (and before upgrading my own mac to 10.7) and in both safari, chrome and firefox, so seems like a general issue with the latest java update.

I've noticed the updated java shows the coffee cup logo in the lower left corner when starting the java plugin while before it was centered, so maybe this is when using plugin2?

Anyway let me know if there is anything I can do to help :)

*

Offline princec

  • *****
  • 1933
    • Puppygames
I can't wait to bundle a JRE with our Mac games :) Come to think of it I should do that for Linux too seeing as JDK7 just broke everything.

Cas :)

I have the same issue... since my development box is Mac 10.6, I feel rather stuck at the moment when it comes to LWJGL.

yeh, this is a known issue, its because OS X 10.7 Lion has switched to java plugin2 by default for Safari. A workaround is to use a LWJGL Window (non embedded or parented) with applets.

Would you be able to give an example of the code to do that, Kappa? I've tried using

Display.setParent(null);

instead of

Display.setParent(display_Parent);

at line 23 in the 'Basic LWJGL Applet' example. (http://lwjgl.org/wiki/index.php?title=Basic_LWJGL_Applet)


But it still freezes my console, at 'Reverting to Sun's UI', and I get no println statements from my actual code.

Is that the only thing I need to do? I'm using Applet Loader, and from what you mentioned on IRC earlier, I think it is loading the jars correctly. (hh.angryrodent.net)

*

Offline kappa

  • *****
  • 1319
This issue should now be fixed in latest nightly builds of LWJGL, see this thread for me info.