jim watson quoted:
 
              We don't recommend setting the CLASSPATH environment
variable because
              it can be long-lived (particularly if you set it in a login
or startup
              script). It's also easy to forget about, and then one day,
your
              programs won't work because the compiler or interpreter
loads a crusty
              old class file instead of the one you want. An old,
out-of-date
              CLASSPATH variable is a fruitful source of confusing
problems. "

jim watson

Work-around: don't have version numbers in your CLASSPATH. I am a Collector Of Packages, and the classpath in my /etc/profile becomes some 4 lines long. However, my setup is:

/opt/java/package/version/...

and a symlink "/opt/java/package/current" to the most recent version. The CLASSPATH exclusively contains "current", so it automatically upgrades with new software.

It's cleaner to set CLASSPATH in a wrapper script, of course, but often this only is feasible for a deployment situation. When hacking/developing, you want to have all stuff at your fingertips.
 

-- 
Cees de Groot                     <[EMAIL PROTECTED]>
Acriter Consulting          http://www.acriter.com
--- we're hiring Java developers!
 

Reply via email to