Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i installed sun's jdk and i can't locate it.
In:

/usr/lib/jvm/java-6-sun/

is only jre, where is jdk?

share|improve this question
add comment

5 Answers

Install sun-java6-sdk and it'll install the SDK. The SDK and the JRE are separate packages.

share|improve this answer
    
i installed it. –  user12888 Mar 23 '11 at 19:40
    
Then why are you looking for it? The system should already have it configured to work as you need it to, this includes things like Eclipse, and the command line java compiler. –  Thomas W. Mar 23 '11 at 20:32
    
All you'd need to worry about is having it installed. Eclipse and other IDEs will be able to detect the software. –  Thomas W. Apr 18 '11 at 14:32
add comment

From a terminal, Confirm if the package is installed using.

sudo dpkg -l|grep -i sun-java6-jdk

List all the files installed by the package using

sudo dpkg -L  sun-java6-jdk

The listing of all files will help you to locate where directories/files installed by Ubuntu.

share|improve this answer
add comment

If you want to find out what is the default on your system you could do it like this.

ls -ltr /etc/alternatives/javac

It will list a symbolic link pointing to the default jdk of your system.

On my system the default is located at '/usr/lib/jvm/java-6-openjdk'. There is also an alternative jdk installed at '/usr/lib/jvm/java-6-sun'.

If there aren't any you will need to install the package 'sun-java6-jdk' as pointed out in some other post.

share|improve this answer
add comment

Mine in in /usr/lib/jvm/java-6-sun/

You can check yours via synaptic, select sun-java6-jdk, Properties

share|improve this answer
add comment

Try this command

update-alternatives --display java

This will list all java packages installed in your system.

Sample output:

java - auto mode
  link currently points to /usr/lib/jvm/java-6-sun/jre/bin/java
/usr/lib/jvm/java-6-sun/jre/bin/java - priority 63
  slave java.1.gz: /usr/lib/jvm/java-6-sun/jre/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-sun/jre/bin/java'.

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.