开发者

Grails: JAVA_HOME is not defined correctly [closed]

开发者 https://www.devze.com 2023-02-13 05:54 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

I have tried to install Grails framework and command "grails开发者_运维问答" in terminal every time crashes. I am using Debian Squeeze and I set in /etc/profile and ~/.profile this:

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
export GRAILS_HOME="/home/snitch/grails"
export PATH=${PATH}:${GRAILS_HOME}/bin

What is wrong?


Make sure that JAVA_HOME points to a jdk, not just a jvm. See: http://www.grails.org/Installation.

You may need to add ${JAVA_HOME}/bin to your PATH also.


Solved.

JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22 
export JAVA_HOME 
GRAILS_HOME=/home/snitch/grails 
export GRAILS_HOME 
PATH=$PATH:$GRAILS_HOME/bin:$JAVA_HOME/bin 
export PATH 


Should be

export PATH=$GRAILS_HOME/bin:$PATH

and you can test it from the commandline with

echo $PATH

and

java -version
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号