Environment variables for java installation

后端 未结 14 1008
清歌不尽
清歌不尽 2020-11-22 00:52

How to set the environment variables for Java in Windows (the classpath)?

14条回答
  •  囚心锁ツ
    2020-11-22 00:56

    For deployment better to set up classpath exactly and keep environment clear. Or at *.bat (the same for linux, but with correct variables symbols):

    CLASSPATH="c:\lib;d:\temp\test.jar;"
    CLASSPATH=%CLASSPATH%;"

    Or at command line or *.bat (for *.sh too) if classpath id not very long:

    java -cp "c:\lib;d:\temp\test.jar;"
    

提交回复
热议问题