LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cant Found jvm file in /etc (https://www.linuxquestions.org/questions/linux-server-73/cant-found-jvm-file-in-etc-880205/)

thoufiq 05-11-2011 09:14 PM

Cant Found jvm file in /etc
 
Hello All,
I am the new user of linux and installing eclipse IDE in the ubuntu server10.10. I have followed the steps given in the links http://www.cyberciti.biz/faq/howto-u...igure-jdk-jre/ and http://eclipse.dzone.com/articles/ho...-33-ubuntu-710. After installing sun-java6-bin, sun-java6-jre and sun-java6-jdk, i cant found the jvm file in /etc. While giving the below command i got only one result but in that link they have given 4 to 5 results.How to find the jvm file in /etc.


$ sudo update-java-alternatives -l
java-6-sun 63 /usr/lib/jvm/java-6-sun

$ java -version
Error: could not open '/usr/lib/jvm/java-6-sun-1.6.0.21/jre/lib/i386/jvm.cfg'



Pls anyone point me to the right directions.

Many Thanks.

paulsm4 05-11-2011 11:06 PM

Hi -

There isn't any "jvm file in /etc".

If you installed the JDK and JRE from Ubuntu package manager or "apt-get", then you should be able to run Java without doing anything further. Please try these commands:
Code:

java -version
javac -version
whereis java

One possibly complication is that you might have *multiple* different versions of Java. Ubuntu (along with most other Linux distros) uses "alternatives" to make one or another version the "default" version. For example:
Quote:

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

sudo update-alternatives --config java
Failing all else, can also try a brute force "find" to locate your Java install(s):
Code:

find / -name java -print 2>/dev/null
'Hope that helps .. PSM

knudfl 05-14-2011 02:51 AM

Quote:

I have followed the steps ...
Are you sure ?

'sudo apt-get install sun-java6-jdk' : Will provide "version 1.6.0.24"
and you have the buggy version 1.6.0.21.

Please read this ...
http://java.dzone.com/articles/sun-j...=toya256ForRSS

..

paulsm4 05-14-2011 10:11 PM

Thanx, knudfl -

I assumed the discrepency was just a typo on the OP's part - but maybe there's something more to it.

thoufiq -

1. I noticed in this other post that you might still be having problems.
If you've resolved the problem, please post back how you fixed it, and mark the thread "solved".
That way, you can help others learn from your question.

2. Otherwise, if you haven't resolved the problem, please cut/paste the output of these commands:
Code:

java -version
whereis java

whereis javac
javac -version

find / -name java -print 2> /dev/null

3. If you find a viable "java", please focus on the "update-alternatives" command.

4. If you don't find Java, please either run another "apt-get", or follow the article Knudfl cited.

5. Whichever you choose, please cut/paste the exact commands and the exact text of any error messages.

Thank you in advance .. PSM


All times are GMT -5. The time now is 02:32 AM.