Fix eclipse project setup - eclipse

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.

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.

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

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.

Can't import portlet into Eclipse IDE (SDK Error Message)

I'm having problems trying to import a portlet into Eclipse IDE.
First i tried File/ New / Liferay Project from Existing Source. As soon as i add my Lferay Project Location the message ]"Project is not located inside Liferay Plugins SDK" shows up. This is the location of my portlet C:\liferay-plugins-sdk-6.2.10.1\portlets\valisa2014-portlet, so the error message makes no sense to me. I have confirmed that the portlet is indeed inside my sdk.
I have also tried to import the porlet by File / Import and then Liferay -> Liferay Project from Existing Source, same thing as soon as i put my Liferay project location the same error message will show up:"Project is not located inside Liferay Plugins SDK"
And finally i tried Import -> Import Liferay Projects, Im able to select my SDK and on the "Projects to Import" options i can see my portlet but i got an "Invalid Plugin SDK Location" as soon as i select my sdk.
I really don't understand what's going on, my sdk is already configured on Eclipse and it have worked in the past when importing another portlets or themes to Eclipse, my build.user.properties have also worked in the past (this is a project i have been working on for months) so i don't know why i'm not able to import this portlet.
Im using Liferay 6.2, Tomcat 7, Eclipse Kepler Service Release 2.
Ok after dealing with those JAVA issues i have finally been able to import my portlet to Eclipse, and is still a mistery to be honest. I'm still not able to import the portlet with the "Liferay Projects from Plugins from SDK", still getting the "Invalid Plugin SDK location" even when i can see my new portlet listed and ready to be selected. So i tried with Import -> "Exiting Projects into Workspace" and it finally worked. Actually this was the only import method that worked for me, after trying every single way to import a Portlet in Liferay. Wish i can have a better idea why is not working with the other ones. Well hope this solution will help someone with the same problem in the future. If you guys have more feedback will be really appreciated.
Have you defined your SDK in Eclipse?
Eclipse plug-in complains that there is no SDK defined. It does not bother to discover the SDK on its own. You have to do it manually.
Try defining the runtime, that is Liferay installation, as well - it gets handy when overriding files in hooks.
Eclipse Only looks for the projects whose names end in thw word portlet. So make sure that your project has the proper name format.

Failed to create javafx flatform in netbeans

I got this error when I'm trying to create a Java Swing Application, by using Netbeans.
I really don't know how to fix this error. Internet did't give me a really good answer.
I Unistalled Netbeans & then reInstalled. but It doesn't work.
How can I fix this error. Thank you.
I don't have a NetBeans installation at hand, but have a look at your Java installations configured in NetBeans ("Java Platform Manager" in Tools menu?). Select the Java version you are using. There should be a JavaFX tab. I think you can disable it there, if you don't need it.
Note: If you're using the latest Java version from Oracle, then JavaFX should automatically be configured correctly, since JavaFX is now shipped with the JDK.

Eclipse says 'Class not found' even though the classes are available

In Eclipse UI, I got the following problem,
If you see left side, the classes are available. I am able to build using Maven and run it successfully. But this Eclipse error highlighting is really annoying.
I am using Eclipse Indigo SR2 and installed Spring Tool Suite. Please help me on fixing this issue. Thanks.
try importing com.beatle.model.* and see what happens