Recently I kept hitting an issue of Eclipse not recognising my imports (even though they were there). I was always getting the message:
1
| import ClassName cannot be resolved |
.
Where ClassName was my imported class. I’m using the MyEclipse Workbench 5.5.1 on Eclipse 3.2. Here are a few tips on how you can fix this (some worked for me, some didn’t):
- ‘Clean’ Your Eclipse Project: Go to Project > Clean in Eclipse [This seems to work for me]
- Refresh your project folder (right click on your project > refresh)
- Re-build your project
- Clean your builds (If using Ant or Maven – clean your builds)
- Recreate your project in Eclipse
- ‘Switch’ Workspace – then Switch back (Eg Change to Debug, then switch back to Java)
- ‘Switch’ Workspace – then Switch back (Eg Change to Debug, then switch back to Java)
- Remove and re-add your JRE:
1. Right Click on your project > properties
2. Click on the Libraries tab
3. Click on the JRE
4. Click remove, then OK
5. Repeat 1-3 again, but add the JRE again
Hope at least ONE of those tips help!
If you get this boring message “firefox is already running” when you want to start it, follow these steps to solve the problem.
1. Goto profile folder. (it is under .mozilla/firefox)
2. Delete the files .lock and .parentlock
3. When you restart firefox , if you get a red bar with a message something like “..bookmarks system not available..”,
first backup your “places.sqlite” (it is under profile folder). (Backup is not to loose bookmarks)
Delete the files places.sqlite and places.sqlite-journal.
4. Restart firefox.
You can copy your places.sqlite back to recover your bookmarks.
To configure the Java Plugin follow these steps:
1. Exit Firefox browser if it is already running.
2. Uninstall any previous installations of Java Plugin. Only one Java Plugin can be used at a time. When you want to use different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
3. Create a symbolic link to the libnpjp2.so file in the browser plugins directory
* Go to the plugins sub-directory under the Firefox installation directory
cd <Firefox installation directory>/plugins
* Create the symbolic link
ln -s <Java installation directory>/lib/i386/libnpjp2.
* If Firefox is installed at this directory: /usr/lib/<Firefox installation directory>
* And if the Java is installed at this directory: /usr/java/<Java installation directory>
* Then type in the terminal window to go to the browser plug-in directory: /usr/lib/<Firefox installation directory>/plugin
* Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/<Java installation directory>/lib/i386/libnpjp2.so
4. Start the Firefox browser, or restart it if it is already up.
In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.
Today, when I wanted to start my eclipse I got following error. The environment is Windows XP, Eclipse for EE Developers (Galileo) with Java 1.6 SDK.

JVM Terminated. Exit Code=-1
Intuitively I removed the content of Eclipse.ini and it seemed to work. However, I did not want to remove ini configs just to be able to run Eclipse again (especially memory allocation parts).
Reducing the -Xmx512m to -Xmx256m solved the problem.
Niether I know why Eclipse did not start today (itworked yesterday and there is no notable change in system config since yesterday) nor I have a reasonable explanation for solution (and problem). Does anyone have an idea?
function failureHandler(o) {
alert('Error: ' + o.status + ', ' + o.statusText);
}
function successHandler(o) {
var result = o.responseText;
var useThisAnywhere = trim(result);
}
var request = YAHOO.util.Connect.asyncRequest('GET',
'ajaxReturn.jsp?param=' + value + ',param2=' + value2,
{ success:successHandler, failure:failureHandler }
);
File file;
File dir = new File("C:/test/");
String[] filesToRemove = dir.list();
if (filesToRemove.length>0) {
for (int i=0; i<filesToRemove.length; i++) {
if (filesToRemove[i].endsWith(".ext")) {
file = new File(dir, filesToRemove[i]);
file.delete();
}
}
}