java -classpath ".;./lib/*" xxx.xxx.xxx.MainClass
“.;./lib/*”
window环境以分号“;” 做分割
Linux以冒号“:”做分割
“.” 指当前目录
该命令适用于,jar包中的MANIFEST.MF未指定MainClass
这篇博客介绍了如何在Java中设置类路径(classpath),特别是在Windows和Linux环境下使用分号或冒号进行路径分隔。文章强调了'.'代表当前目录,并解释了当MANIFEST.MF文件未指定MainClass时,如何通过命令行指定启动的主类。
java -classpath ".;./lib/*" xxx.xxx.xxx.MainClass
“.;./lib/*”
window环境以分号“;” 做分割
Linux以冒号“:”做分割
“.” 指当前目录
该命令适用于,jar包中的MANIFEST.MF未指定MainClass

被折叠的 条评论
为什么被折叠?