2

How do I set JAVA_HOME=/usr/lib/jvm ...E ? The instructions say to use

INSTALL4J JAVA_HOME=/usr/lib/jvm/java-6-sun

but I get an error that says:

INSTALL4J: command not found

I have downloaded INSTALL4J and I installed it (I think). It asked all sorts of questions that I did not know how to answer, so I just hit "Next" a lot. Any ideas?

kiri
  • 27,676
  • 16
  • 81
  • 117
user3317888
  • 21
  • 1
  • 2
  • 2
    possible duplicate of [How can I install Sun/Oracle's proprietary Java 6/7 JRE or JDK?](http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-6-7-jre-or-jdk) – jobin Feb 17 '14 at 06:51
  • 1
    Where are you getting your instructions from? – kiri Feb 17 '14 at 07:27

1 Answers1

2

Not sure where you get the instructions, but there's another way to set the JAVA_HOME as follows:

For single user:

vi ~/.bash_profile

you can change the vi to your favorite text editor like gedit

then at the end of the file put this:

export JAVA_HOME=<path-to-java>

where <path-to-java> in your case might be /usr/lib/jvm/java-6-sun/bin/java

now set PATH as follows (below JAVA_HOME):

export PATH=$PATH:/usr/lib/jvm/java-6-sun/bin

now save the file and exit, log out and login to see the new changes.

Note: if you want to set JAVA_HOME for all users this link might help you: source

riccivr
  • 353
  • 5
  • 11