When I run a Java project within the Eclipse IDE
, I assume in the background it is开发者_开发问答 simply calling java.exe
or javaw.exe
with certain parameters, such as the classpath
it's using and the actual class it's running.
Is there a way I can make Eclipse
show this invocation, with all it's parameters? Ideally I'd like to be able to copy&paste
it into a command window to duplicate the running of the project outside of the Eclipse IDE
.
(Original Answer: February 2011)
Launch your program in debug mode in Eclipse.
You can then see the exact command in the properties of the Debug views (see this thread or this thread)
First run or debug one of the configurations.
In the Debug view in the Debug perspective, right-click the running process and select "Properties". The command line used to launch the configuration is displayed.
Bug 10820 was about "[java launching] Launch config: show cmd line before launch"... but it is closed as WONTFIX.
Update (March 2012)
bbuser reports in the comment having
had to remove
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:60019
from the command line shown in properties in the Debug view.
Otherwise I got connection errors.
Also changingjavaw.exe
tojava.exe
might be advisable
精彩评论