6

when I change my foo.java file in Eclipse there are no changes in the foo.class inside the bin folder.

I think there must be a way that Eclipse change this automatically when altering an foo.java file?

I even can't make it manually.

Hope you can help me.

Thanks

3
  • 1
    By "make it manually" you mean you tell eclipse to build and nothing happens? Commented Jul 1, 2010 at 20:01
  • If you're looking at it in Eclipse's explorer view, you may need to refresh the project. Commented Jul 1, 2010 at 20:25
  • Normally, you should not even have to think about the class files if you edit, save and run in Eclipse, unless there is something unusual you want to do with the class files. Commented Jul 1, 2010 at 23:01

3 Answers 3

8
  • Make sure it's a java project
  • Make sure the java file is in a source folder (right click project, properties, build path)
  • Make sure you have automatic build turned on (Project menu -> Build automatically)
Sign up to request clarification or add additional context in comments.

3 Comments

Build Automatically is on, but when I make a new class no .class file is generated
It is likely built in the same directory as the source. Check the Default output folder on the Source tab of the Project's properties.
I dont know exactly why, but now there is my .class file, it seems I have to investigate a bit Eclipse
5

One of the other most important things people forgot to mention is that you also need to check the "problems" view to make sure there are not errors in your project. To view problems:

Window -> show view -> Problems

If there are 'Errors' you need to correct those before the eclipse can compile.

1 Comment

I did! Works perfect.
3

I know this is an old post, but I wanted to contribute in case someone else comes across this problem. When I experienced this problem (today) the build path looked good, class path looked good, default output directory was good, Java compiler looked good, but nothing. Then I selected Project, Properties, Builders and it said the builder was missing...the builder was incorrect. I removed the missing builder, opened the .project file (you may have to adjust the navigation filters to see this) and added:

    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>

inside the buildSet tags, and viola everything works. Hope this helps someone.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.