help,Neither the JAVA_HOME nor the JRE_HOME

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
zph999
帖子: 4
注册时间: 2008-08-31 17:46

help,Neither the JAVA_HOME nor the JRE_HOME

#1

帖子 zph999 » 2009-01-05 22:21

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

jdk jre 的问题,搞了2个晚上了,郁闷 帮忙给看看吧。
jdk1.5+tomcat5.5
jdk确定安装好了,并且测试 javac 能运行。
这样配置的环境变量:

代码: 全选

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.15 
export JRE_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre
export PATH=$PATH:$JAVA_HOME/bin
有人说改etc/profile文件,可是 没权限阿??
看不出什么问题了,请指教 ;
zph999
帖子: 4
注册时间: 2008-08-31 17:46

Re: help,Neither the JAVA_HOME nor the JRE_HOME

#2

帖子 zph999 » 2009-01-06 21:31

怎么没人帮忙?问的不对?还是太简单了?
头像
hamaburg
帖子: 284
注册时间: 2006-06-30 12:52

Re: help,Neither the JAVA_HOME nor the JRE_HOME

#3

帖子 hamaburg » 2009-01-07 14:38

有一条就可以了

export JAVA_HOME=/你的java 路径

现在 我不加在 /etc/profile ,而是放到 tomcat 的启动脚本中。 还有关闭脚本,
这样方便 以后 直接 打包 tomcat 目录

编辑

代码: 全选

[hamaburg@devel00 ~]$ grep export /usr/local/tomcat5/bin/startup.sh 
export JAVA_HOME=/usr/java/default
zhuxiufenghust
帖子: 4
注册时间: 2008-10-04 10:47

Re: help,Neither the JAVA_HOME nor the JRE_HOME

#4

帖子 zhuxiufenghust » 2009-05-12 21:30

thanks for your help,I finally solve the problem which has bothered me for almost a week!
回复