Re: Which version of Sun Java have I got?



On 8 March 2011 21:59, Colin Law <clanlaw@xxxxxxxxxxxxxx> wrote:
On 8 March 2011 21:29, Alan Pope <popey@xxxxxxxxxx> wrote:
On 8 March 2011 21:11, Colin Law <clanlaw@xxxxxxxxxxxxxx> wrote:
In another thread it was pointed out that we should be using Sun Java
6.24 rather than 20 as this had security issues.  When I type
java -version
I get
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)


That's openjdk, not the Sun build.

Stupid boy, why don't I read what I am posting.


But when I do
sudo apt-cache policy sun-java6-jre (or bin or jdk or whatever)
I get
sun-java6-jre:
 Installed: 6.24-1build0.10.10.1

That's the Sun one.

So you have both installed but you have your system default set to the
OpenJDK one.

If you would like to switch to have the default being Sun JVM then see
this page:-

https://help.ubuntu.com/community/Java

Specifically the section titled 'Choosing the default Java to use'

OK, I have switched to the Sun one so now java -version shows
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
as it should.

The only issue now is why jEdit, on its help about says (and did say
before setting the default to Sun
jEdit 4.4pre1 using Sun Java 1.6.0_20
which is what confused me in the first place.  I think that is a
question for the jEdit list though.

For the record I have got to the bottom of this. Obviously at some
point I installed the openjdk version and had it selected as the
default. The first confusion was that jEdit on its Help > About page
says that it using Sun Java even when it is using openjdk (which also
came from Sun apparently) so that I did not realise that I was using
the wrong one. The second was that somehow I was invoking jEdit via a
script that explicitly selected the openjdk version, though how that
came about I have no idea. Having changed that then all is well.

Thanks again all for the help.

Colin

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: How to remove openjdk
    ... installed Oracle's java. ... What is the proper way to completely remove jEdit and openjdk so I can ... I install alternatives-gtk to check ...
    (Ubuntu)
  • Re: How to remove openjdk
    ... installed Oracle's java. ... What is the proper way to completely remove jEdit and openjdk so I ... I install alternatives-gtk to check ...
    (Ubuntu)
  • Re: How to remove openjdk
    ... I installed jEdit on my new install of 12.04 before I ... >> installed Oracle's java. ... If I had read it I would have stopped the install, but I would have been surprised also because I'm sure I have read that jEdit is not officially supported on openjdk. ...
    (Ubuntu)
  • Re: java again really
    ... You don't need to remove anything before installing Sun Java. ... But it will be easy now with sim links to use the right java and jedit will work. ... i have my kickstart file NOT install the default java package and instead install the latest rpm from Sun. then, i added lines to my post-install that uses the alternatives command to make the Sun install the current best version. ...
    (Fedora)
  • Re: java again really
    ... You don't need to remove anything before installing Sun Java. ... with sim links to use the right java and jedit will work. ... we had a lot of problems with the default java install on FC7 and 8. ...
    (Fedora)