Posted by: reformedmusings | July 12, 2009

Sun Java support after Firefox 3.5 install in Ubuntu 9.04

I wrote about the installation process for Firefox 3.5 in this post. In that post, I covered the removal of Firefox 3.0.11, noting that the package sun-java6-plugin would also be removed and that I would look into it later.

Well, it’s later. If you’re using icedtea or openjdk java exclusively in your system, the there’s no need to read further. However, if you are using Sun Java as your primary Java system, as I do for Moneydance, then the loss of sun-java6-plugin leaves a capability hole in Firefox 3.5. It turned out that some sites, like the National Weather Service radar loops, didn’t work after the sequence in my previous post.

I believe that we lose the Sun Java plugin when removing Firefox 3.0.11 is because the  sun-java6-plugin package doesn’t yet recognize the firefox-3.5 package as a supported browser requiring its services. So, it thinks that the java plugin is no longer required if no other supported package is present on the system. To get it back, I decided to reinstall sun-java6-plugin, which will also install Firefox 3.0.11. I chose to work from the terminal, because it provides more flexibility. That turned out to be a wise decision. First type:

sudo aptitude install sun-java6-plugin

That will also install the packages firefox, firefox-3.0, and firefox-3.0-branding, first asking permission:

fix-ff35-java0

Next we need to uninstall firefox-3.0 but somehow leave the java plugin. In the terminal, aptitude provides alternative courses of action when conflicts arise from your requests. Here’s a screenshot of the first step:

fix-ff35-java-1

aptitude offers the default position that Synaptic would in the GUI. The difference is that we can reject alternatives in aptitude. In the screenshot above, we don’t want to lose the sun-java6-plugin, so we’ll reject this offer from aptitude and ask for another choice by typing ‘n’:

fix-ff35-java-2

This time, aptitude offers to install a small browser that it supports as an alternative to firefox-3.0. While I don’t need midbrowser in general, it doesn’t take up much room and will preserve sun-java6-plugin, which you’ll now notice is not on the removal list. Cool. In a previous run I looked at many alternative approaches, but this proved the most palatable. So when asked to accept this solution, I simply hit Enter to accept the default. aptitude then summarizes the step that it will execute and confirms that’s what I want. Again I hit Enter to say yes and it executes.

Lastly, you want to ensure that the plugin will be incorporated into overall Java system. To do so, tell Linux that you want Sun Java the primary Java support by typing:

sudo update-java-alternatives -s java-6-sun

That’s it. Now everything works as expected.

In retrospect, I could have gone through the alternative selection process on the initial installation of sun-java6-plugin. Coulda, shoulda, woulda.

Advertisements

Responses

  1. […] UPDATE: Later came in this post. […]


Leave a Reply

Please log in using one of these methods to post your comment:

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

Categories

%d bloggers like this: