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
  • 28,246
  • 16
  • 81
  • 118
user3317888
  • 21
  • 1
  • 2

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