Steve Cohen wrote:
> I realize that there is not one answer to this question but I would like
> some of you veteran java/linux developers to suggest what the optimal
> directory structure and setup of the CLASSPATH variable is.
>...
> I know it isn't rocket science, but it is annoying. What I am looking
> for is a strategy. I want to be able to set it one way and forget about
> it, at least until the next project.
For me, the best way to deal with it is explicitly.
I use Sun's JDK, and everything I do looks kinda like
this: every compile or execution is driven by a
shell script (or batch file) that starts off
with something like
MYJDK=/usr/local/jdk1.1.6
MYCLASSPATH=.:$MYJDK/lib/classes.zip
and then
java -classpath $MYCLASSPATH ...
In other words, the classpath is completely specified
each time I run java or javac. No more mysteries.
- Dan