The import org.apache.commons.net cannot be resolved - Eclipse Juno - eclipse

Good morning:
I have a terrible problem with my Eclipse Juno.
Due to I had to format my computer, I lost the configuration of my Eclipse Juno.
I am trying to work again with my new Eclipse Juno configured, but I think something is missing.
My problem is, I import a Java Project that HAS NO ERROR some weeks ago, and I am 100 % sure about that.
Now, the project has errors like:
**The import javax.mail cannot be resolver
The import org.apache.commons.net cannot be resolved
TimeStamp cannot be resolver to a type
**
Of course, I tried all.
I cleaned the project.
I tried to remove and add again all the libraries I got in the java build path.
I tried to switch from jre6 to jre7.
I tried to change the Target Platform...
Nothing worked!! I am desperate!
Can anyone help me?
PS: I have the tomcat 5.5 installed in Eclipse Juno also.
Thank you.

Calm yourself. The problem is simply that your project need some additional libraries to be compiled. By the errors you showed, you need at least these:
javamail.jar
commons-net.jar
They are both open source libraries and you will find them with a bit of googling.
Why before formatting everything worked fine, and now it doesn't anymore? Surely you had these libraries in some other place outside your project. For example, within the bundled libraries of Tomcat.

Related

Importing a Gradle Project (libGDX) in Eclipse Photon

nothing I have found so far helped me. I am trying to Import a Gradle Project (libGDX Project to be exact) into Eclipse Photon but the only thing I get is the following :
On my other Notebook everything worked fine. On this one here I have JDK 8 installed. Does anyone know what's going on ?
Before I tell you what I think is wrong, have a good look at the error message. Eclipse is basically telling you it tried to find something, in this case a plugin, and couldn't.
As the error message says, you need to install the gradle gwt plugin in order to import gradle projects. To do this, open up the plugin market place, search for "gradle gwt", (in general) download the most popular one, and follow the installation process.
I hope this answer helped you! If you have any other questions about this answer, feel free to leave a message below.

Java Eclipse SWT OSX bug

So I researched a lot about this problem and haven't found anything useful for me yet.
It is mainly about this bug with:
[Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Which seems to be related to a bug Eclipse know themselves.
I have tried running Eclipse Indigo, Eclipse 4.2.1 and Eclipse 4.3 with the same result. I tried starting the Eclipse on the second thread as suggested by somewhere "-XStartThreadSecond"<--- something like that, but Eclipse dont recognize that anymore it seems. So maybe someone found a solution to this after so long time?
I am running OSX Mountain Lion, JRE 6, above Eclipse's and I also tried making JRE 7 work in my Eclipse, but the JRE 7 VM dont exist in the folder it should be(I Haven't installed anywhere else).
EDIT:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=212617
http://www.eclipse.org/forums/index.php/m/809088/
I had the same problem when I was using JFreeChart, however none of the solutions worked. Every time I tried to run java application that created a JFrame it crashed on a Mac.
However, I had realized that I have had included all libraries that came with JFreeChart in the Project build path. If you have the same problem, check your library under:
Project -> Properties -> Java Build Path -> Libraries
All you need are: jcommon-1.0.17.jar, and jfreechart-1.014.jar
If you are not using JFreeChart, still check your build path if you are using some conflicting libraries.
Cheers!
I had the same problem using JFreeChart with Eclipse on OSX. It seems adding only jcommon-1.0.17.jar and jfreechart-1.014.jar into your JAR reference path instead of the whole list of libraries is the solution.
Thanks

Maven projects import does not work well

This is a weird problem and probably, It has a stupid solution, but still.
I have recently install a windows 32 bit machine on a VBOX (runs originally on linux). I don't know if it is important but maybe.
I installed a fresh eclipse Juno with m2e and m2e-wtp.
I checked out a maven project (multi module) from SVN and then i tried to Import it as maven project to eclipse, simply by right clicking --> import --> maven --> existing maven project.
I have done this millions time with no problems till now.
Eclipse imports all the projects but they all have this error:
Project build error: Non-resolvable parent POM: Could not find artifact com.xx.xx:parent-pom:pom:1.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM.
Also, when I right click a java project, and check it's properties it seems that eclipse does not recognize it as a java project (I added a screenshot).
I wish to state that I am the only one here to have this problem, so I assume this is an eclipse problem.
Please help.
Regards,
Idob
Are you sure, that the parent-pom is available in the correct version?
The error message tells you that the parent-pom is not available.
Either it has to be available as an eclipse project, or it has to be available at your repository. You can find your local repository in WinXP machine by default at Documents and Settings\.m2\repository.

Scala Eclipse IDE - strange behavior

I am giving a try to Scala Eclipse IDE after a very long time. I installed Eclipse and the said Scala plugin only a while ago, but I am unable to get stuff working. In all of the Scala files, I get the errors like following (See the tooltip):
This project uses Gradle for building, and I also have the latest version of Groovy plugin installed. Please help me get this thing working. Thanks.
Edit:
Thank you, everyone. The problem was solved. It appears there was a problem with my Scala plugin installation. A complete reinstall of everything (including Eclipse) helped. Also, this time I did not install the Groovy plugin.
I don't know which version of Eclipse / Scala-IDE you're using, but there are two reasons I know this sometimes happens:
1) You don't have JDT weaving for Scala installed.
The scala-ide uses aspects to weave in code into the JDT compiler. If you don't have this installed, this may cause the Scala files to be seen as Java files.
2) If, somehow, the Java Source File content type includes *.scala. In fact, it should be Scala Source File. If this is the case, you should remove the *.scala from the Java Source File content type.

Fix eclipse project setup

import java.util.*; is not recognized by eclipse, shows red alert. All java API's are not recognized.
Here is what happened. java 7 got installed to my system automatically. From that incident, it is behaving like this. I have uninstalled Java 7. I don't use eclipse to build or run.
Please help.
Thanks in advance.
EDIT: this is the project setup.
Check your classpath in eclipse and make sure it has a reference to jre library. If not, add it.
UPDATE:
Right-click on an error. Click on Quick Fix and search for the suggestion of importing a project or library.