Eclipse查看命令行命令

自己在命令行模式下执行工程一直出错,参考eclipse如何执行,看一下eclipse的执行命令:

  1. debug模式下运行程序
  2. debug窗口找到主线程
  3. 右击查看Porperties
  4. 查看Command Line属性
  • 例如:
"C:\Program Files\Java\jdk1.8.0_05\bin\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:51251 -Dfile.encoding=UTF-8 "-Xbootclasspath:A:\jars\rt_debug.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_05\jre\lib\jfr.jar" -classpath A:\code\workspace_dev\TCPServer\bin;A:\code\workspace_dev\TCPServer\lib\commons-logging-1.1.1.jar;A:\code\workspace_dev\TCPServer\lib\log4j-1.2.17.jar com.demo.main.Main

注意eclipse使用的是javaw运行的,自己在命令行使用java命令执行的命令是

java -classpath ".;A:\code\workspace_dev\TCPServer\bin;A:\code\workspace_dev\TCPServer\lib\commons-logging-1.1.1.jar;A:\code\workspace_dev\TCPServer\lib\log4j-1.2.17.jar" com.demo.main.Main

参考资料:
https://blog.csdn.net/Icecream0/article/details/8212137

你可能感兴趣的:(Eclipse查看命令行命令)