java Grails:JAVA_HOME 定义不正确
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5098940/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Grails: JAVA_HOME is not defined correctly
提问by Droid
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
:
每次崩溃时,我都尝试在终端中安装 Grails 框架和命令“grails”。我使用Debian的挤压,我集/etc/profile
和~/.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?
怎么了?
回答by Ray Tayek
Make sure that JAVA_HOME
points to a jdk, not just a jvm. See: http://www.grails.org/Installation.
确保它JAVA_HOME
指向 jdk,而不仅仅是 jvm。请参阅:http: //www.grails.org/Installation。
You may need to add ${JAVA_HOME}/bin
to your PATH
also.
您可能需要添加${JAVA_HOME}/bin
到您的PATH
也。
回答by Droid
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
回答by Burt Beckwith
Should be
应该
export PATH=$GRAILS_HOME/bin:$PATH
and you can test it from the commandline with
你可以从命令行测试它
echo $PATH
and
和
java -version