添加到OSX上的类路径 [英] Adding to the classpath on OSX
问题描述
有谁能告诉我如何添加到OSX上的类路径?
Can anyone tell me how to add to the classpath on OSX?
推荐答案
如果要为机器上的每个Java应用程序提供一组特定的JAR文件(或.class文件) ,那么你最好的办法是将这些文件添加到 / Library / Java / Extensions
。
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
.
或者,如果你想要为每个Java应用程序执行此操作,但仅当您的 Mac OS X帐户运行它们时,请使用〜/ 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.
编辑:如果您只想为特定应用程序执行此操作,如Thorbjørn所说,那么您需要告诉我们更多关于应用程序的打包方式。
If you want to do this only for a particular application, as Thorbjørn asked, then you will need to tell us more about how the application is packaged.
这篇关于添加到OSX上的类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!