Question

I just need a simple environment of .class and .java files in a single folder so that I can execute java files later on using "java xx" in command line without adding any extra syntax. I'm not planning to use packages or sub-directories in my project and I won't be executing any files directly from eclipse either.

Was it helpful?

Solution 2

I think you are looking for this:

Create new project->Java Project->In the Project Layout section change to 'User project folder as root for sources and class files' (using Eclipse Kepler, it should be similar in other versions of Eclipse).

But keep in mind that it might become a mess after some time.

OTHER TIPS

You could create a executable jar file and run it from command line using:

java -jar MyApplication.jar

Here is the link to create an executable jar file from eclipse:

How to create an Executable jar file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top