I am installing RJB by ruby gem on UBUNTU 11.* I added the
export JAVA_HOME=/usr/lib/jvm/java-6-...
export PATH=$PATH:$JAVA_HOME/bin
to the .bashrc
file at home directory.
But still it throws the err or JAVA_HOME
not set.
Does anyone know what is wrong?
echo $JAVA_HOME
shows exactly the right path.
And I did log on again, even reboot. But still throws the same error.
Verify JAVA_HOME Enter the command echo %JAVA_HOME% . This should output the path to your Java installation folder. If it doesn't, your JAVA_HOME variable was not set correctly. Please make sure you're using the correct Java installation folder, or repeat the steps above.
If any program that requires a Java runtime fails to find the JAVA_HOME environment variable upon startup, or if the JAVA_HOME environment variable is misconfigured, it will result in some of the following error messages to be displayed: A Java installation exists but JAVA_HOME has been set incorrectly.
Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
I've run the same issue in Ubuntu 10.04. What ended up working for me was to su into root and install:
sudo su -
export JAVA_HOME=/usr....
gem install rjb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With