开发者

cmd java relative path

开发者 https://www.devze.com 2023-04-01 13:42 出处:网络
I need to run a java class in cmd line. How would I run a 开发者_C百科java class without changing directories, but instead specify a relative path? I have tried the following, but to no avail:

I need to run a java class in cmd line. How would I run a 开发者_C百科java class without changing directories, but instead specify a relative path? I have tried the following, but to no avail:

java -cp ./lib/*; ./bin/javaclass


you need to set classpath till the bin folder.

java -cp ./lib/*;./bin com.foo.MyJavaClass
0

精彩评论

暂无评论...
验证码 换一张
取 消