Is there a way to see what commands are executed b

2019-05-24 08:17发布

This may be a dumb question, but I'm having problems running a Java Application from the command line using java -jar myapp.jar.

The same application runs perfectly inside eclipse when I use the menu to select "run as Java Application"

Can I somehow make eclipse show me in the console exactly what it's executing so I can replicate it via command line?

2条回答
仙女界的扛把子
2楼-- · 2019-05-24 08:53

When you launch the app from Eclipse, go to the Debug Perspective and find the app in the Debug view. Right-click on the class name in the Debug tree (highlighted here in blue)

enter image description here

select Properties, and there you can see the command line that was used to launch the app.

查看更多
我想做一个坏孩纸
3楼-- · 2019-05-24 09:11

Look in the run configurations (Run -> Run Configurations...) for the myapp Java Application run configuration.

The Main tab will show you the main class. This is the class you'll have to add to the command line, or specify when you build your runnable jar.

The Classpath tab will show you any other jars or class files that have to be specified on the class path when you build your jar.

查看更多
登录 后发表回答