Like EFH I don't recommend using the environment variable CLASSPATH very much - people set it and forget why they put various things in there and keep adding new paths onto it, and it becomes a mess. Or they try to clean it up, and then some programs start failing unexpectedly because it turns out that part of the class path really was important for some programs. Instead I prefer to use -cp to tell each individual program what classpath it needs, without trying to force all programs to share.
However, if you must use the CLASSPATH environment variable:
will tell you what it's currently set to, and
will set it to /foo/bar/baz. Often you'll want to do something like
to add something at the beginning of the path (with : as a separator), or
to add something at the end. Eecuting the last three commands one after another will give you a CLASSPATH of
And it's by doing stuff like this that people grow their classpaths into huger overly-complex things, which I prefer to avoid. [ October 24, 2007: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister
posted 12 years ago
Good morning! Good afternoon and in case I miss it, Good night!
Thank you for the replies. I'll have to try those commands later, because unfortunately my MAC is now getting repaired.
I have confidence those commands are what I'm looking for. For all the time invested I give you thanks.
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad: