views:

313

answers:

2

I am having trouble getting Openfire to work. I done the following:

[root@jiaoyou logs]# which java
/usr/bin/java

and I've run this command:

ln -s /usr/bin/java /opt/openfire/jre/bin/java

but when starting Openfire, it still says:

cannot run command `/opt/openfire/jre/bin/java': No such file or directory

It seems like a permission issue, but I don't know how to fix that.

A: 

what is the output of:

ls -latr /opt/openfire/jre/bin/java

John Weldon
[root@jiaoyou logs]# ls -latr /opt/openfire/jre/bin/java -rwxr-xr-x 1 daemon daemon 47116 2009-05-01 17:11 /opt/openfire/jre/bin/java
Shore
Thanks!... I like Pauls answer... did you set the JAVA_HOME?
John Weldon
+1  A: 

/usr/bin/java is just a shell script that runs the actual binary. If you don't have the JAVA_HOME environment variable set correctly, it might not be able to locate the binary if invoked through a symlink like that.

Another thing to keep in mind is that some distros of Linux put /usr/bin/java in place even though you haven't installed the Sun JRE. Don't bother trying to use the GNU version of Java, it's rubbish. Do you know if the Sun JRE is installed or not? What does "java -version" tell you?

Paul Tomblin
What should I do then?
Shore
What happens when you type "java -version" on the command line?
Paul Tomblin