Adding a non-jar file to the Java class path

前端 未结 2 1670
南方客
南方客 2021-01-02 18:03

I\'m trying to make a .txt file available to my application via the class path. In my startup script--which is co-located in the same folder as the .txt file--I\'ve set the

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 18:49

    You should add to your classpath the directory containing the file, and not the file itself:

    set CLASSPATH=%CLASSPATH%;%CD%
    

提交回复
热议问题