• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse not compiling classes anymore

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add it to the Java Build path under Project -> Properties

WP
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Michele"

Add those jars to your Java Build Path.

Project -> Properties

WP
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, this worked great for me.

Thanks again,
 
Jackie Li
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
rad kri
Greenhorn
Posts: 10
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wasted hours only to find out the stupid Eclipse project had a dependency on another maven project that had problems but was "NOT in the workspace" .

PLEASE "Go to Window/Show View/Problems" and fix those problems on this project first!!!

Hope this helps some one using Eclipse maven multi module projects.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic