Accepted answer

you can un-check the build automatically in project menu and then build by hand by type ctrl + b, or clicking an icon the appears to the right of the printer icon.


go to the project explorer block ... right click on project name select "build path"-----------> "configuration build path"

then the pop up window will get open.

in this pop up window you will find 4 tabs. 1)source 2) project 3)library 4)order and export

click on 1) source

select the project (under which that file is present which you want to compile)

and then click on ok....

go to the workspace location of the project open a bin folder and search that class file ...

you will get that java file compiled...

just to cross verify check the changed timing.

hope this will help.



try this in your console:

javac {$pathtoyourproyect}/*

if you also need any external library, try:

javac -cp {$pathtoyourlibrary}.jar {$pathtoyourproyect}/*


right click on the file on package explorer then go to show in under it go to terminal eclipse will have a terminal then use javac filename to compile


in the case that you delete your .class file in eclipse and then try to build it again from the .java file it will do nothing. if you try to run the .java file without the .class file you will get an error that it can not find the main class.

you will either have to change and re-save the .java file then build it again, or else you have to run clean on the project then build again.


right click on yourproject(in project explorer)-->build project

it will compile all files in your project and updates your build folder, all without running.


you will need to go to project->clean...,then build your project. this will work, even when your source code does not contain any main method to run as an executable program. the .class files will appear in the bin folder of your project, in your workspace.

Related Query

More Query from same tag