wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse not compiling classes anymore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse not compiling classes anymore" Watch "Eclipse not compiling classes anymore" New topic
Author

Eclipse not compiling classes anymore

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Hello I was using Eclipse (Eclipse Java EE IDE for Web Developers. Version: Helios Service Release 2 Build id: 20110218-0911) just yesterday to make some changes to some class files. They were compiling normally and I was uploading them to the testing server until all of a sudden I got a red exclamation point on my project and when I search for *.class files in that folder (workspace).

I have other projects in the package explorer which do not have a red exclamation point on them, and the class files are still there and these also compile normally. I verified this by searching for the *.class files.

I have used subversion before on 5/8/2012 and wanted to restore my site to that site to see if this made a difference and it did not make any difference at all, I still have a red exclamation point on my project.

I was wondering if you have any suggestions for me in terms of getting this red exclamation point off my project and also so that .class files will compile normally.

Thank you,
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Are you sure "Build Automatically" is turned on?

Sometimes when you delete or overwrite your "target" or "bin" folders, you need a manual build.

WP
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
It was not turned on but I did put a check mark beside it but it still has the red exclamation point over the project.

Thanks,
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2271
    
  28

Open the Problems view. Go to Window/Show View/Problems. It will list out all the failures while compiling the code.

You can also try refreshing the project and cleaning it to force a rebuild. Sometimes, if you change some of the files outside of eclipse, eclipse doesn't know they are updated. Refreshing forces it to reload everything, and cleaning will force it to rebuild.
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Thanks, this helped a lot. Only question is:

it it says it is missing a required library such as:

c:\workspace\MMP\WebContent\WEB-INF\lib\jni4net.j-0.8.6.0.jar

where would I put that?

Do I put it in the jboss lib or the eclipse lib?

Thanks,
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Add it to the Java Build path under Project -> Properties

WP
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Michele Smith wrote:it says it is missing a required library

What is "it"? Eclipse? JBoss AS?

And exactly what is the error message? I doubt that it is "Required library c:\workspace\MMP\WebContent\WEB-INF\lib\jni4net.j-0.8.6.0.jar is missing", which is sort of what your post implies. It is very important to be very precise in describing problems.


JBoss In Action
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Hello, I copied and pasted the error into this window from the Problems tab:

Description Resource Path Location Type
Project 'MMP' is missing required library: 'C:\workspace\MMP\WebContent\WEB-INF\lib\jni4net.j-0.8.6.0.jar' MMP Build path Build Path Problem
Description Resource Path Location Type
Project 'MMP' is missing required library: 'WebContent/WEB-INF/lib/commons-io-2.3.jar' MMP Build path Build Path Problem
Description Resource Path Location Type
The project cannot be built until build path errors are resolved MMP Unknown Java Problem


thanks,
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

"Michele"

Add those jars to your Java Build Path.

Project -> Properties

WP
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Thank you, this worked great for me.

Thanks again,
Jackie Li
Ranch Hand

Joined: Sep 12, 2010
Posts: 30
Jayesh A Lalwani wrote:Open the Problems view. Go to Window/Show View/Problems. It will list out all the failures while compiling the code.

You can also try refreshing the project and cleaning it to force a rebuild. Sometimes, if you change some of the files outside of eclipse, eclipse doesn't know they are updated. Refreshing forces it to reload everything, and cleaning will force it to rebuild.


lol, Eclipse is very helpful. Just time on and off, need to go back to the basic tips. lol.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Eclipse not compiling classes anymore
 
Similar Threads
style guide
IntelliJ IDEA Pallada - class files not generated
Global Editor project
Boggled by Eclipse - help!
Eclipse3.0 removes class files automatically