首先感谢各位大大热心回答,启发了我如何搜索。下面是在stackoverflow中搜到的答案,顺利解决了我的问题。 If you want to make a certain set of JAR files (or .class files) available to every Java application on the machine, then your best bet is to add those files to /Library/Java/Extensions.
Or, if you want to do it for every Java application, but only when your Mac OS X account runs them, then use ~/Library/Java/Extensions instead.
首先感谢各位大大热心回答,启发了我如何搜索。下面是在stackoverflow中搜到的答案,顺利解决了我的问题。
If you want to make a certain set of JAR files (or .class files) available to every Java application on the machine, then your best bet is to add those files to /Library/Java/Extensions.
Or, if you want to do it for every Java application, but only when your Mac OS X account runs them, then use ~/Library/Java/Extensions instead.
CLASSPATH=.;%JAVA_HOME%lib;%JAVA_HOME%libtools.jar
设置
CLASSPATH
环境变量%JAVA_HOME%lib/xxx.jar
CLASSPATH=$CLASSPATH:abc.jar所在目录; java ...