Installing java on ubuntu ... what is my java site?

I use below to install java on Ubuntu. What should be my JAVA_HOME:

sudo apt-get -y install openjdk-6-jdk openjdk-6-jre 

eg. JAVE_HOME =?

thanks

+4
source share
5 answers

Here's how it is configured for mine:

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

You can check using the command

whereis jvm

+5
source

run the command:

which java

will probably return / usr / bin / java, which is a link to / etc / alternatives / java, which is another link to (possibly) / usr / local / jvm / java-6-sub / jre / bin / java, therefore your * JAVA_HOME * / should be installed in / usr / local / jvm / java-6-sub / jre

+2
source

Try /usr/lib/jvm/java-6-openjdk-amd64/ . This works for me.

+1
source

Look at /usr/lib/jvm , it should be there.

0
source

Enter: "echo $ JAV", and then click the tab for autocomplete. Then press enter. If the path variable does not exist, use: "whereis java" or "find / -iname" java "2> / dev / null"

0
source

Source: https://habr.com/ru/post/1393327/


All Articles