How is the Java classpath set on a Mac?

后端 未结 2 1146
青春惊慌失措
青春惊慌失措 2021-01-21 12:14

How is the Java classpath set on a Mac?

2条回答
  •  遥遥无期
    2021-01-21 12:48

    On Mac OS X, I stopped using the CLASSPATH environment variable some time ago; I now set it for each project. Too often, I would forget about older, conflicting JARs hiding in the forgotten recesses of an ever growing list of paths. In particular, I don't know of a reason to set it for Tomcat. If you're curious, $CATALINA_HOME/bin/setclasspath.sh may be informative.

    If you need it for some other reason, the bash incantation to include this or that is shown below:

    export CLASSPATH=.:/opt/this/this.jar:/opt/that/that.jar:…

提交回复
热议问题