search

Home  >  Q&A  >  body text

macos - 如何将一个jar包配置到java的环境变量/CLASSPATH?(不是一个工程的CLASSPATH)

PHP中文网PHP中文网2829 days ago723

reply all(4)I'll reply

  • 阿神

    阿神2017-04-18 10:12:25

    First of all, thank you for your enthusiastic answers, which inspired me how to search. The following is the answer found in stackoverflow, which successfully solved my problem.
    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.

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:12:25

    CLASSPATH=.;%JAVA_HOME%lib;%JAVA_HOME%libtools.jar
    设置CLASSPATHEnvironment variables

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:12:25

    %JAVA_HOME%lib/xxx.jar

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:12:25

    CLASSPATH=$CLASSPATH: the directory where abc.jar is located; java...

    reply
    0
  • Cancelreply