Adding to the classpath on OSX

后端 未结 5 664
野趣味
野趣味 2020-11-29 17:24

Can anyone tell me how to add to the classpath on OSX?

5条回答
  •  囚心锁ツ
    2020-11-29 18:18

    In OSX, you can set the classpath from scratch like this:

    export CLASSPATH=/path/to/some.jar:/path/to/some/other.jar
    

    Or you can add to the existing classpath like this:

    export CLASSPATH=$CLASSPATH:/path/to/some.jar:/path/to/some/other.jar
    

    This is answering your exact question, I'm not saying it's the right or wrong thing to do; I'll leave that for others to comment upon.

提交回复
热议问题