Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAVA_HOME not setting for RJB

Tags:

java-home

rjb

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.

like image 247
Sen Han Avatar asked Nov 19 '12 06:11

Sen Han


People also ask

Why JAVA_HOME is not working?

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.

What happens if JAVA_HOME is not set?

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.

How do you fix please set the JAVA_HOME variable in your environment to match the location of your Java installation?

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.


1 Answers

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
like image 56
diegogs Avatar answered Sep 29 '22 15:09

diegogs