I need to run a java class in cmd line. How would I run a 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
您需要设置类路径直到bin文件夹。
java -cp ./lib/*;./bin com.foo.MyJavaClass
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.