Reputation: 2162
I have set the environment variables for my system using the standard way (i.e. setting them in the ~/.bashrc). Everything compiles and working fine, but when I try to see the $CLASSPATH variable, "No such file or directory" message is shown at the end of the variable string, like this --
user@user-pc:/media/Data$ $CLASSPATH [press enter]
bash: .:/opt/jdk1.7.0_03/lib/tools.jar:/opt/jdk1.7.0_03/lib/dt.jar:/usr/local/lib/JMF-2.1.1e/lib/jmf.jar:/usr/local/lib/jfreechart-1.0.13/lib/jfreechart-1.0.13.jar:/usr/local/lib/jfreechart-1.0.13/lib/jcommon-1.0.16.jar: No such file or directory
any ideas? all the jar locations are correct, nothing is missing/misspelled, I did double check.
EDIT Note: I am setting them like this --
JAVA_HOME=/opt/jdk1.7.0_03;export JAVA_HOME
JMFHOME=/usr/local/lib/JMF-2.1.1e;export JMFHOME
JFRC_HOME=/usr/local/lib/jfreechart-1.0.13;export JFRC_HOME
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
:$JMFHOME/lib/jmf.jar:$JFRC_HOME/lib/jfreechart-1.0.13.jar
:$JFRC_HOME/lib/jcommon- 1.0.16.jar;export CLASSPATH
I am using Ubuntu 10.04 and please ignore all the "new line"s above, they are due to the markdown editor of the SO.
Upvotes: 2
Views: 4376
Reputation: 45115
Try echo $CLASSPATH
instead of just $CLASSPATH
by itself -- the shell is interpreting
your entire $CLASSPATH
string as a command, and not finding it.
Upvotes: 9