The future of IcedTea plugin

So after being poked and prodded by people (you know who you are.. you’re on my list now) to start a blog, here is my first post!

According to this post, it seems Gecko is going to definitely remove LiveConnect and OJI soon. I had heard whispers of this before, but people stopped talking when I got close. Probably because I stumble into discussions drunk and start rambling about how Picard was the best captain[1]… but we will never know. Anyway, now it is official.

This is a problem for the IcedTea plugin, which uses LiveConnect/OJI. Here is a brief history of things:

  • Back in the day (before sliced bread and all) Mozilla plugins had an API called  NPAPI. This API was fine for most cases, but lacked scriptability (i.e. allowing  the page to interact with the plugin via Javascript in any significant manner, and vice-versa).
  • To fulfill this need of scriptability for Java, a Javascript<->Java bridge called LiveConnect was developed. The older Sun Java plugin used this via an API called OJI.
  • Around the end of 2004 (this date is from Wikipedia without citation, so it may not be accurate) browsers supporting NPAPI agreed on a new scriptable extension to NPAPI, known as NPRutime. Around 2007, Sun started working on a new plugin (libnpjp2.so) that uses NPRuntime. The new plugin is now the default.

With the Sun plugin having switched over to the new API, there are very few users of LiveConnect/OJI now and Gecko has decided to therefore remove it and reduce the maintenance burden.

As there is no date available for when the new Sun plugin will be released as Free Software[2], we’ve decided to start work on a new plugin that works via NPRuntime. The new plugin will be implemented in 2 phases:

1. Get normal Java applets working (including signed ones)
2. Get the Javascript<->Java bridge working

#1 is relatively easy, and will cover a large number of use cases. It is #2 that will be time consuming. Since NPRuntime is just an extension of NPAPI, that means that the older GCJ Web plugin (which uses NPAPI) can be used as a skeleton. That is the route I am currently taking. The idea is to modify GCJWebplugin so that it can use the new NetX-ified Java backend that IcedTea plugin uses, and consequently support signed applets, cookies, proxies, etc.

As stated in the message by Josh in the link above, Gecko will be making the change in 1.9.2 which will be the base for Firefox 3.6 due in Q2 2010. Bleeding edge distros like Fedora Rawhide will switch to Gecko 1.9.2 sooner than that of course, but it will still be a good few months before that. Hopefully it will be enough time for a rewrite! I am close to being done with the first phase. Next on my list is planning how we will be implementing the bridge, figuring out the necessary resource allocation, etc. I will keep updating this blog as things progress. Rest assured, we will try our best so that when OJI is removed there is a smooth transition to keep productivity at a minimum by allowing everyone to use Yahoo Games, Absolute Poker, etc.

1: Not that it needed saying, but still: I was kidding – I don’t stumble into discussions drunk and ramble about Star Trek. And as if Picard needs to be justified!

2: Edit: I should’ve reworded that. What I meant to say was that there is no confirmed release date. As per

http://openjdk.java.net/projects/jdk7/features/#f647

http://openjdk.java.net/projects/jdk7/milestones/

It is targetted for M4. However it cannot be confirmed and should that date be missed, it will be rather late to start a plugin rewrite and distros like Rawhide won’t have Java plugin support in that mean time. Hence the push for rewrite now…

About these ads

About dbhole

I have been a member of the Java Group at Red Hat since mid-2008. I started off as an engineer and in late 2012, I switched to the dark side, a.k.a management :) I now manage all the members in the Java Group and some members from the QE team dedicated to JDK/component related QE.
This entry was posted in IcedTea. Bookmark the permalink.

11 Responses to The future of IcedTea plugin

  1. Andrew overholt says:

    Congratulations on the blog, my friend!

  2. Lillian says:

    finally! even if it means i am at the top of your hit list.

  3. Roman Kennke says:

    Interesting. It’s not unlikely that I’ll start working on Sun’s plugin soon, maybe I can push them a little to free it up. :-)

  4. Thank you Deepak for your massive effort put into the java plugin. I surely enjoy using it. For me the plugin and the related work with netx integration opens up many cool and interesting possibilities to use webstart deployment of applications on networked mobile device environments.

    What are the most enjoyable web applet that you have encountered during all your debugging sessions?

    • dbhole says:

      I am glad to hear that! Always good to know that the plugin opens up new possibilities :)

      I have come across many interesting applets over time, but a couple that I have always found fascinating (from a liveconnect standpoint) are:
      JMol
      Jigzone

      Both make good use of LiveConnect to have page/applet interaction.

  5. Ismael Juma says:

    Hi,

    “As there is no date available for when the new Sun plugin will be released as Free Software”

    They have sort of announced a date:

    http://openjdk.java.net/projects/jdk7/features/#f647

    http://openjdk.java.net/projects/jdk7/milestones/

    Best,
    Ismael

    • dbhole says:

      I did see that (I will edit the post to add those links.. should’ve done it before, sorry about that).

      Anyway, I couldn’t get confirmation that the target will be achieved :) Since it would be too late by M4 date to start work on a new plugin (we want to keep Rawhide and other similar distros running with the new Gecko) , we’ve decided to push ahead with a rewrite.

  6. Chris Hubick says:

    “As there is no date available for when the new Sun plugin will be released as Free Software, we’ve decided to start work on a new plugin that works via NPRuntime.”

    This is a lot of work to do, when a free plugin was already promised! I hate seeing work duplicated like this when skilled developers could be put to better use on other tasks. Was http://blogs.sun.com/darcy/entry/openjdk_and_the_new_plugin all a bunch of BS then? Has there been any communication with Sun before this decision was made? Grr. I hope Oracle changes things like this.

    Either way, thanks for all your work, and the blog :)

    • dbhole says:

      It is the confirmation that it will be reaching in M4 that is the issue. I am very glad that Sun intends to open their plugin, and look forward to when it happens. However, if the M4 target is missed, it becomes too late to start a plugin rewrite and a last minute hasty rewrite is something best avoided.

  7. Pingback: Introducing the IcedTeaNPPlugin « Deepak’s Blog

  8. Pingback: Deepak Bhole: Introducing the IcedTeaNPPlugin | Techie News

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s