Error! How to install GlassFish in Ubuntu 9.04?
I try to install GlassFish on开发者_运维问答 Ubuntu, and I get the error:
Could not locate a suitable jar utility. Please ensure that you have Java 6 or newer installed on your system and accessible in your PATH or by setting JAVA_HOME
when I type
echo $PATH
it prints out:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/jdk1.6.0_20:/opt/jdk1.6.0_20/bin
Where is the problem and how to solve it?
I have also read "Problems installing Java EE SDK on Linux", but it doesn't work.
N.B. Before reinstalling Ubuntu it works fine. This problem comes after reinstallation.
if you follow this tutorial you should be fine and all you problems will be gone: http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu
The problem is that you have /opt/jdk1.6.0_20 in your PATH and the java executables are located in /opt/jdk1.6.0_20/bin. The best way is to define JAVA_HOME environment variable that contains /opt/jdk1.6.0_20 string and add $JAVA_HOME/bin to PATH variable.
The problem was related to user permissions. I think I tried to install GlassFish without enough rights.
精彩评论