Chris55
December 8th, 2007, 04:21 PM
In an effort to install Sun's Glassfish J2EE App Svr I ran into the following problem when executing:
sudo -s
ENTER PASSWORD
java -Xmx256m -jar glassfish-installer-v2-b58g.jar
cd glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml <= This blew-up
Here is the Terminal stack...
root@JavaDev:/usr/local/glassfish# lib/ant/bin/ant -f setup.xml
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.03/lib/tools.jar
Buildfile: setup.xml
all:
get.java.home:
setup.init:
check-java:
get.java.home:
setup.init:
validate-java:
[echo] Current Java Version 1.6.0_03
BUILD FAILED
/usr/local/glassfish/setup.xml:156: The following error occurred while executing this line:
/usr/local/glassfish/setup.xml:136: The following error occurred while executing this line:
/usr/local/glassfish/setup.xml:132: Please set java.home to a JDK installation
Total time: 7 seconds
I installed ant from the Ubuntu package archive...
root@JavaDev: apt-get install ant
I selected the latest version of Java (1.6.0.03)...
root@JavaDev: sudo update-alternatives --config java
I edited the Java environment variables...
root@JavaDev. gksu gedit /etc/environment
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.03"
CLASSPATH=".:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar"
PATH="/usr/lib/jvm/java-6-sun-1.6.0.03/jre/sbin:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
And Ant still can not find the tools.jar! I searched the entire file system and can not find tools.jar. Any suguests would be appreciated.
Thanks.
Chris
sudo -s
ENTER PASSWORD
java -Xmx256m -jar glassfish-installer-v2-b58g.jar
cd glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml <= This blew-up
Here is the Terminal stack...
root@JavaDev:/usr/local/glassfish# lib/ant/bin/ant -f setup.xml
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.03/lib/tools.jar
Buildfile: setup.xml
all:
get.java.home:
setup.init:
check-java:
get.java.home:
setup.init:
validate-java:
[echo] Current Java Version 1.6.0_03
BUILD FAILED
/usr/local/glassfish/setup.xml:156: The following error occurred while executing this line:
/usr/local/glassfish/setup.xml:136: The following error occurred while executing this line:
/usr/local/glassfish/setup.xml:132: Please set java.home to a JDK installation
Total time: 7 seconds
I installed ant from the Ubuntu package archive...
root@JavaDev: apt-get install ant
I selected the latest version of Java (1.6.0.03)...
root@JavaDev: sudo update-alternatives --config java
I edited the Java environment variables...
root@JavaDev. gksu gedit /etc/environment
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.03"
CLASSPATH=".:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar"
PATH="/usr/lib/jvm/java-6-sun-1.6.0.03/jre/sbin:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
And Ant still can not find the tools.jar! I searched the entire file system and can not find tools.jar. Any suguests would be appreciated.
Thanks.
Chris