JOGL applets on Mac OS X?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL applets on Mac OS X?

Ralph Elliott
A couple of weeks ago Apple released Safari 5.1, which only supports the "out-of-process" Java plugin.  But JOGL applets currently work only with the now-defunct "in-process" plugin.  So JOGL applets no longer run on Safari -- putting Safari in the same bad position that Chrome and Firefox have been in for some time.  (Actually, in Chrome and Firefox, JOGL applets do run, but without the JOGL rendering -- which is clearly not much use.)

This is very disappointing for people like me developing JOGL-based applets.  Are there plans to upgrade the Mac OS X JOGL implementation to support the now-almost-universal out-of-process plugin architecture?

I asked about this yesterday on the Mac Java Developers' mailing list and got the impression that Apple believe this is technically feasible and are keen to see it happen.  (If you're interested, consult the Mac java developers' archives for more details.)

-Ralph Elliott


--
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Wade Walker
Administrator
Hi Ralph,

I'm actually working on the JNLPAppletLauncher right now, and was about to check the problems with Chrome and Firefox on Mac (documented at https://jogamp.org/bugzilla/show_bug.cgi?id=497) to see what's required to fix them. I'll make sure to check Safari 5.1 too. So do you see the same behavior with Safari now that we've seen with Chrome and Firefox, where the rendering square is just blank?

Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Ralph Elliott
Hi Wade,

I'm sticking with Safari 5.0.5 on my primary system to avoid this issue.  But yesterday I set up a temporary test system with Safari 5.1.

The Safari 5.1 behaviour -- as I found it, on this one occasion, at any rate -- is slightly different to the Chrome/Firefox behaviour, although they all use the out-of-process plugin for applets regardless of the Java Preferences setting:

- On Chrome and Firefox, I would describe the behaviour as "everything but the rendering works", i.e.:
-- the applet loads in a separate process,
-- the console and menu-bar coffee-cup icon for that process's JVM appears,
-- if the applet is prodded into action by the the web page's javascript GUI
  then the console (and js gui) behave exactly as if the applet were running,
-- BUT throughout all this the applet panel is continuously blank (white background), as you say.

- On Safari 5.1, however:
-- the out-of-process JVM starts up
  (its console and coffee-cup menu-bar icon appears),
-- it sniffs around briefly (just for a second or two),
-- then it apparently decides that it can't proceed, and
-- it exits (the console and menu-bar coffee-cup icon disappear).
While all this happens, and subsequently, the applet panel appears as blank (but grey rather than white), except maybe for a Java coffee-cup icon in the bottom left corner.  Obviously, because the applet process's JVM has shut-down, the applet is not actually running at all -- so if one tries to prod it into action via the javascript GUI nothing happens.

Btw, you mention the JNLPAppletLauncher.  I may be wrong but, as I understand it, there's no need to use JNLPAppletLauncher once one switches to the out-of-process plugin, since that plugin supports proper JNLP applet launching, i.e. applet launching via a genuine JNLP file using the "jnlp_href" applet parameter -- as described on the Java deployment pages:

    http://download.oracle.com/javase/6/docs/technotes/guides/jweb/index.html
    http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
    etc.

-Ralph


--
   
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Wade Walker
Administrator
Looking into this now. The latest FF and Chrome versions on Windows now fail even with JNLPAppletLauncher, and fail the same way when I try to launch without it, so there may be something we need to adjust in JOGL to adapt to new browsers. IE 9 works fine, with our without JNLPAppletLauncher, and Windows Safari 5.1 works only with JNLPAppletLauncher.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Wade Walker
Administrator
OK, turns out the failures I saw were due to a regression in the latest dev build of JOGL (see https://jogamp.org/bugzilla/show_bug.cgi?id=510). With that regression fixed, applets work on Windows in FF 6, Chrome 13, and IE 9 without JNLPAppletLauncher (using the Javascript launch code from Oracle's site). Safari 5.1 doesn't work this way (on Windows, at least) -- it still needs JNLPAppletLauncher to run properly, and there are still bugs in it (see https://jogamp.org/bugzilla/show_bug.cgi?id=505).
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Wade Walker
Administrator
In reply to this post by Ralph Elliott
Ralph Elliott wrote
I asked about this yesterday on the Mac Java Developers' mailing list and got the impression that Apple believe this is technically feasible and are keen to see it happen.  (If you're interested, consult the Mac java developers' archives for more details.)
I've successfully built their example code from http://developer.apple.com/library/mac/#samplecode/JAWTExample/Introduction/Intro.html, but it's not obvious how to work that into JOGL as it stands now. It looks like it will require some pretty major changes, which probably only Sven is qualified to do.

It sounds like (from reading http://lists.apple.com/archives/java-dev/2011/Aug/msg00067.html) that the Apple guys are working with Oracle engineers on this same problem -- hopefully they can come up with a solution that doesn't require such a different rendering model for applets.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Ralph Elliott
Wade Walker wrote
        ....
I've successfully built their example code from http://developer.apple.com/library/mac/#samplecode/JAWTExample/Introduction/Intro.html, but it's not obvious how to work that into JOGL as it stands now. It looks like it will require some pretty major changes, which probably only Sven is qualified to do.

It sounds like (from reading http://lists.apple.com/archives/java-dev/2011/Aug/msg00067.html) that the Apple guys are working with Oracle engineers on this same problem -- hopefully they can come up with a solution that doesn't require such a different rendering model for applets.
My impression from what the Apple guy says is that it's not a completely trivial task to get JOGL based on the new plugin architecture, but that it's nevertheless feasible -- and he says he's happy to work with you on it.  So, if/when you guys are able to put some effort into this -- in fact maybe before that -- I'd suggest it's well worth opening a discussion with him.

(I certainly have no right to expect you to put effort into this -- but if it's likely that you won't be able to, or don't expect to be able to do so for some time, then I'd quite like to know that -- because I'd need to look seriously at other ways of getting my OpenGL software to run in web browsers, despite having invested significant effort in JOGL-based software.)

PS  I would hope that Oracle, as well as Apple, would be willing to provide real support for this effort (as Sun used to do), on the basis that unwillingness on their part would call into question their commitment to Java as a cross-platform environment.

-Ralph


--
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

Wade Walker
Administrator
Ralph Elliott wrote
My impression from what the Apple guy says is that it's not a completely trivial task to get JOGL based on the new plugin architecture, but that it's nevertheless feasible -- and he says he's happy to work with you on it.  So, if/when you guys are able to put some effort into this -- in fact maybe before that -- I'd suggest it's well worth opening a discussion with him.
They do seem open to discussion -- let me talk with Sven to see if there's any way I can help out. I may be able to do some initial investigation on this while Sven is finishing up the Android stuff from SIGGRAPH.

Ralph Elliott wrote
(I certainly have no right to expect you to put effort into this -- but if it's likely that you won't be able to, or don't expect to be able to do so for some time, then I'd quite like to know that -- because I'd need to look seriously at other ways of getting my OpenGL software to run in web browsers, despite having invested significant effort in JOGL-based software.)
I think Plugin2 works fine on Windows and Linux, it's just messed up on the Mac. I can't promise how soon it will be fixed, since it sounds like Apple themselves are still actively changing things. But in the meantime there are some options: you could use Java Web Start for the Mac version, or (ugly option) you could have Mac folks run your applet with "appletviewer <your URL>" until we get these issues sorted out.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

jouvieje
Great to know that you're working on a proper applet support on mac :)

Lwjgl has already fixed their applet support with new plugin architecture on mac, so it's effectively feasible. Hope this can also be integrated in jogl too.

-Jérôme
Jérôme
Reply | Threaded
Open this post in threaded view
|

Re: JOGL applets on Mac OS X?

gabnicu
Hello,
Just seen last night an announcement from Sven about implementing the fix which would allow a JOGL applet to run in browser in MacOS with JRE 1.6.0.20 or later. The announcement is here:
https://jogamp.org/bugzilla/show_bug.cgi?id=497#c8
Do you have any idea when the release would be available? We need it as we have a Java3D applet which doesn't run on MacOS anymore (once JRE is upgraded past 1.6.0.17)
Thx, Gabi