How to compile and run Java Eclipse Project from command prompt?
How to run a Java Eclipse project from Command Line with java file name only. I don't want to to use class file or jar files generated by Eclipse.
Is it possible?
Even with jar file, I found loading of static file was failing, as FileNotFoundException, how to solve that?
I meant to run like this-
First javac then java
解决方案
The whole point of an Integrated Development Environment is to setup and manage your source code and its dependencies.
Eclipse does this one way, Netbeans does it another way, and so does IntelliJ.
You can try to reproduce it by simulating Eclipse's Deployment Assembly. Find out where your libraries and source code is stored. Use those directories for your javac command. Then execute java with the class you want that contains a main method.
This gets harder if your project is meant to be a web application.
You really should let the IDE do it for you.