Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: is there a way to get Eclipse to output the commands given to run your program?

Tags:

java

eclipse

ide

I'm having some build issues with Eclipse in that it runs my app just fine in eclipse but for some reason when trying to run using

#>java MyClass

it ends up not running due to not being able to find the class. This makes no sense so I was wondering if there was a way to have eclipse output what it's feeding into the jvm to get it to build/run.

Is this possible?

Thanks

like image 660
Matthew Stopa Avatar asked Jan 01 '10 19:01

Matthew Stopa


2 Answers

you can get the exact command used by Eclipse like this:

  1. Run your program inside Eclipse.
  2. Go to the Debug perspective.
  3. Terminate the program, or let it end. right click on the second line. (Terminated, exit value... ) and select properties. in there you will have the full command line used.
like image 83
Omry Yadan Avatar answered Sep 28 '22 11:09

Omry Yadan


I don't know of any way of getting Eclipse to show any command line arguments - but I'm sure we can solve your problem in other ways.

  • What is the full name of your class? Is it just MyClass, or is it in some package? You need to supplied the fully qualified name, e.g.

    java mypackage.MyClass
    
  • Where are the class files? You need to make sure they're on the class path, e.g.

    java -classpath bin mypackage.MyClass
    
like image 35
Jon Skeet Avatar answered Sep 28 '22 10:09

Jon Skeet