zhangjiangbin

windows下,对于需要依赖的jar包使用-cp ,多个jar包之间使用分号;java命令运行时注意.;

javac -cp .;d:\javaTestIP\httpcore-4.4.1.jar;d:\javaTestIP\httpclient-4.4.1.jar;d:\javaTestIP\commons-logging-1.2.jar TestIPMain.java
java -cp .;d:\javaTestIP\httpcore-4.4.1.jar;d:\javaTestIP\httpclient-4.4.1.jar;d:\javaTestIP\commons-logging-1.2.jar TestIPMain

 

linux下,对于需要依赖的jar包使用-cp ,多个jar包之间使用冒号:java命令运行时注意.:

[root@bogon javaTestIP]# javac -cp .:httpcore-4.4.1.jar:httpclient-4.4.1.jar:commons-logging-1.2.jar TestIPMain.java
[root@bogon javaTestIP]# java -cp .:httpcore-4.4.1.jar:httpclient-4.4.1.jar:commons-logging-1.2.jar TestIPMain

 

原文地址:https://blog.csdn.net/myfmyfmyfmyf/article/details/53179395

 

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2021-10-18
  • 2021-11-15
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案