I have a problem executing my java sample "hello world" program outside Eclipse while Eclipse can execute it whenever I push the Run menu button. So I want to know the command line Eclipse uses to execute the java program.
A fully working command-line Terminal inside Eclipse. Just press Ctrl+Alt+T to open a local command prompt (Terminal).
In Eclipse, select File → Export, then Java → Runnable JAR File. Launch Configuration identifies which program should be exported. Find the one that runs the class containing your main() method. Export Destination is the name and location of the JAR file you want to generate.
The javac utility is the most important command-line interface (CLI) tool you will find in the JDK's bin directory. This is the Java compiler, and whether you use Maven, Gradle, the SpringSource IDE or Jenkins CI, it's this JDK tool that's used under the covers when Java source code gets compiled.
You can check the other parameters arguments
, classpath
, environment variables
etc. that eclipse might be using to compile your program, from the Run Configurations
window, which appears as a dropdown when you click the drop-down button next to the Run
button in eclipse.
To get the full command line, you can open the Debug view
from Window>Show View>Other...
. Right click on the last launch and go to properties. Eclipse will list the exact command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With