Kind of old question I know, but if you want to know command prompt for running Eclipse-based project (i.e the one that Eclipse uses)
- Run your project into Eclipse
- Goto Debug perspective
- (on my screen anyway) Window in top left corner should have a little
'debug' tab.
- Right click on name of your project, select
Properties
at
the bottom of drop-down
- Click on the 'Command Line' field (this is what you
probably want).
- Press [ctrl]+A & [ctrl]+C to select and copy
- Either paste this into command line, or
- (what I did) in Windows, create new
*.bat
text file and paste it in
there ... now double clicking on that file should run your java proj.
Pretty useful if you wanna run something out of eclipse and are lazy like me.
BTW I needed this for exporting project for a uni assignment. Of course, they wanted to see code in *.java
files too and above just uses *.class
files Eclipse builds on the fly.
To make batch compile your *.java files & then run you need to put together an appropriate javac
command before the javaw
line you got from process above and adjust accordingly - look at Java Docs for this. Eclipse has done most of hard work with library class paths though (I was using a few libs).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…