[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Trouble setting environment variables



Hi,

I've been trying to set my PATH and CLASSPATH environment variables so that they point to my JDK's bin and some Java source files respectively and this is what I've written in my .profile file:

# PATH should also include the latest jdk "bin" directory
PATH="/usr/lib/jvm/java-6-sun-1.6.0.20/bin:$PATH"

 # set the CLASSPATH variable to include anything I do with java
 CLASSPATH="/home/jason/code/java:$CLASSPATH"

Yet I don't seem to have much luck, since "echoing" both environment variables gives me the old value of PATH for PATH and nothing for CLASSPATH:

jason@debian:~$ echo $PATH
/usr/lib/eclipse6.0/bin/i386_linux:/home/jason/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
jason@debian:~$ echo $CLASSPATH

jason@debian:~$

This is strange, especially for PATH, because earlier in my .profile I've written:

# set PATH so it includes the eclipse bin directory
  PATH="/usr/lib/eclipse6.0/bin/i386_linux:$PATH"

And if you notice the output produced by "echo", this directory is well under the scope of PATH.

What am I doing wrong? Do I need to "export" something?

Thanks.



Reply to: