Java Error

Asked by Nayef Copty on 2007-05-08

Hello,

I installed Java correctly.. All online Java applications work fine, and I even have the Sun Java 5.0 Plugin Control Panel under System -> Preferences

I installed Limewire and Frostwire, which require Java, but each time I run them from Terminal, I get this:
nayef@nayef-desktop:~$ frostwire
Starting FrostWire...
Java exec found in PATH. Verifying...
OOPS, you don't seem to have a valid JRE. FrostWire works best with Sun JRE available at http://www.java.com
OOPS, unable to locate java exec in /usr/lib/ hierarchy
You need to upgrade to JRE 1.5.x or newer from http://www.java.com
ls: /usr/java/j*: No such file or directory
OOPS, unable to locate java exec in /usr/java/ hierarchy
You need to upgrade to JRE 1.5.x or newer from http://www.java.com
ls: /opt/j*: No such file or directory
OOPS, unable to locate java exec in /opt/ hierarchy
You need to upgrade to JRE 1.5.x or newer from http://www.java.com

Could you please help me?

Best Regards,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 πŸ¦„
Solved:
2007-05-08
Last query:
2007-05-08
Last reply:
2007-05-08
Ralph Janke (txwikinger) said : #1

How did you install Java and Limewire and Frostwire? Did you install it from the ubuntu repositories via a package manager?

Open a terminal and run the following command:-

java -version

I get this on my Ubuntu Feisty system:-

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

What do you get?

nayef@nayef-desktop:~$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.0 (Ubuntu 4.1.0-1ubuntu8)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hmm.. that's version 1.4, I need 1.5
But I installed it from Java.com, shouldn't Java.com give me the latest release?
Btw, I am using Dapper

That's not sun java, that's gnu java. Frostwire only works with Sun Java, not GNU java.

No, don't install java from java.com. Use the repositories, this page details how:-

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

nayef@nayef-desktop:~$ sudo apt-get install sun-java5-bin
Reading package lists... Done
Building dependency tree... Done
sun-java5-bin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nayef@nayef-desktop:~$ sudo apt-get install sun-java5-jre
Reading package lists... Done
Building dependency tree... Done
sun-java5-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have both packages, why doesn't it use them?

If you continue reading the page I referred to you will see a section "Selecting the default Java version". Read that.

Ralph Janke (txwikinger) said : #7

You need to select sun-java as your default java.

You can do this with this command:

If you use java 5 from sun:

sudo update-java-alternatives -s java-1.5.0-sun

or if you use java 6 from sun

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

I hope this helps

Thanks Alan Pope, that solved my question.