Installing Sun Java 6

I was able to install the package sun-java6-jdk from synaptic with no problems.  The update alternatives were what caused me problems:

<br />
skp@pecan:~$ sudo update-java-alternatives --list<br />
[sudo] password for skp:<br />
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk<br />
java-6-sun 63 /usr/lib/jvm/java-6-sun<br />
skp@pecan:~$ sudo update-java-alternatives --set java-6-sun<br />
update-alternatives: error: no alternatives for mozilla-javaplugin.so.<br />
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.<br />
update-alternatives: error: no alternatives for mozilla-javaplugin.so.<br />
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.<br />
skp@pecan:~$</p>
<p>

These errors threw me off at first because I thought they kept it from working.  You can run java -version to see that it really is using the correct version.  Sun’s version reports this:

<br />
skp@pecan:~$ java -version<br />
java version &quot;1.6.0_24&quot;<br />
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)<br />
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)<br />
skp@pecan:~$</p>
<p>

Open JDK reports this:

<br />
skp@pecan:~$ java -version<br />
java version &quot;1.6.0_22&quot;<br />
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)<br />
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)</p>
<p>

As far as I can tell, the “No Alternatives for” messages aren’t causing a problem, so I am not going to worry about it.  If you have any info on that, please comment.

This is the error message that I am getting from my Java that the Sun JDK has solved in the past. I’ll leave it for another later post, but I wanted to share it in case anyone has any ideas. Please comment if you do:

<br />
The program '.' received an X Window System error.<br />
This probably reflects a bug in the program.<br />
The error was 'BadMatch (invalid parameter attributes)'.<br />
  (Details: serial 1359 error_code 8 request_code 140 minor_code 4)<br />
  (Note to programmers: normally, X errors are reported asynchronously;<br />
   that is, you will receive the error a while after causing it.<br />
   To debug your program, run it with the --sync command line<br />
   option to change this behavior. You can then get a meaningful<br />
   backtrace from your debugger if you break on the gdk_x_error() function.)</p>
<p>

Resources

One thought on “Installing Sun Java 6

Leave a Comment

Your email address will not be published. Required fields are marked *