“Error: JAVA_HOME is not defined correctly.” in building Jikes rvm

徘徊边缘 提交于 2019-12-05 06:15:11

run this command:

find . -exec grep "jdk1.6.0" {} \;

To find out which file is setting JAVA_HOME to that path.

Rorschach

While you build jikes you can either build it using ant or using the command you are using. If the JAVA_HOME problem is causing trouble use

bin/buildit localhost production -j"path to your jvm directory"

-This is present in "/usr/bin/jvm".

Another method: There is bin/buildit.base_config in which path for JAVA_HOME is specifically mentioned. So under "# Default JAVA_HOME values" you can modify appropriate location, for example,

global.javahome.ppc32-linux=/usr/lib/jvm/java-6-sun-1.6.0.26
global.javahome.ppc64-linux=/usr/lib/jvm/java-6-sun-1.6.0.26
global.javahome.ia32-linux=/usr/lib/jvm/java-6-sun-1.6.0.26
global.javahome.x86_64-linux=/usr/lib/jvm/java-6-sun-1.6.0.26

You can chose which you want to use. If not familiar with your architecture, modify all and now you can build without having to worry about your java path to be mentioned explicitly. For more detailed information check this blog

I have also written a small article on how one can start to fiddle with Jikes

It's JRE but not JDK. Install JDK and make JAVA_HOME pointing to it.

You might get this error due to couple of reasons. To fix this quickly please follow below steps,

First find the java location. To get a list of your installed Java platforms, run the following command from the terminal:

$ sudo update-alternatives --config java

Now set JAVA_HOME and PATH,

$ export JAVA_HOME=<java_home>

$ export PATH=$JAVA_HOME/jre/bin:$PATH

Create the symlink

$ sudo ln -s <java_home>/jre <java_symlink_path>

When we take your case as a example :

$ sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.22/jre /opt/jdk1.6.0

Above command will create the symlink location where the system is trying to find in your issue.

Finally do the try your app.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!