Java Classpath Problems in Ubuntu
Posted
by Travis
on Stack Overflow
See other posts from Stack Overflow
or by Travis
Published on 2010-05-18T03:18:19Z
Indexed on
2010/05/18
3:20 UTC
Read the original article
Hit count: 562
First off I'm running Ubuntu 9.10
I've edited the /etc/environment file to look like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20"
CLASSPATH="/home/travis/freetts/lib/freetts.jar:/home/travis/freetts/lib/jsapi.jar:."
I then run "source /etc/environment" to make sure the changes are included. Then I try compiling my simple test program using this:
javac Test.java
It throws out a few errors, but when I compile like this:
javac -cp /home/travis/freetts/lib/freetts.jar:/home/travis/freetts/lib/jsapi.jar:. Test.java
It works just fine, this leads me to believe that for some reason javac isn't seeing the CLASSPATH environment variable? I can echo it and everything in the terminal:
echo $CLASSPATH gives me what I put in.
Any help on this would be greatly appreciated.
© Stack Overflow or respective owner