Adding to the classpath on OSX

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

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

5条回答
  •  感动是毒
    2020-11-29 18:16

    To specify a classpath for a single Java process, you can add a classpath option when you run the Java command.

    In you command line. Use java -cp "path/to/your/jar:." main rather than just java main

    The option tells Java where to search for libraries.

提交回复
热议问题