Eclipse is freezing itself before getting started - java

I've been trying to open Eclipse to start my work today, and it freezes everytime during load.
My Eclipse is Helios. Someone told me I should remove a file called .lock from .metadata folder, but still didn't work.
Does anyone have any idea of how do I "melt" this thing up?
ps: I opened it yesterday with no problems.

Have you already tried to start Eclipse with a -clean parameter? Sometimes this can resolve some issues..

I would suggest a (big) problem with a plugin in Eclipse.. because project plugins or runtimes will execute later.
Create a new workspace and repimport your projects from your old workspace. If you have a vcs, you can re-checkout them.

Start it with the -clean option.
It should take a bit longer (depends on your eclipse configuration and workspace, but if nothing is really broken, it will get it to work).

I believe something is wrong with your workspace. I typically remove current and create new one in such case. It usually takes up to 5 minutes (if I have to add 20 projects). In most cases it takes less.

I have experienced something similar when launching Eclipse after having to force close it for some reason.
If it always hangs when loading the SVN plugin — like in your screenshot — it is likely to be related to that. In this case I suggest the following:
back up your current workspace
launch Eclipse with the -data command line argument to specify a different workspace folder
if Eclipse starts up successfully, try to import your projects from the original workspace or even better from SVN

Related

Eclipse won't generate import statements, stopped showing Quick Fix suggestions

My Eclipse installation suddenly stopped showing import suggestions. If I type a class name that isn't in the current package, autocomplete works fine and shows the class, but after picking from the drop-down, the class name is highlighted as an error with the message "MyClass cannot be resolved to a variable". This error shows no Quick Fix suggestions. However, if I manually add the relevant import statement at the top of the file, the code compiles and runs fine.
I've checked my build path and everything appears to be in order -- and like I said, the code runs when I hand-jam the import statement -- but losing automatic importing is really slowing me down. Any idea what could have gone wrong? It worked fine last week!
ETA: Another note, if it helps: F3 still opens the class declaration, so Eclipse clearly knows what I "mean", even without the import statement.
Also also: Things that have not helped:
Clean all projects
Restarting Eclipse
Restart computer
Delete .metadata from workspace, re-import project
Start new Java project, re-link source folder, re-add dependencies (not using Maven, but that's not my choice)
Thanks for all the help, everybody, but this turns out to have been a case of a broken Eclipse install.
I still haven't figured out exactly how or what was broken, but I tried to make a new project with a single "Hello World" class. The New Class wizard errored out with "Creation of element failed" in the class org.eclipse.wst.jsdt.internal.core.dom.rewrite.ImportRewriteAnalyzer. Once I hit "internal errors" in Eclipse, I gave up and installed a fresh Eclipse from a new download.
With a new Eclipse, I got my Quick Fix suggestions back, as well as automatic imports. I guess in future I'll try reinstalling Eclipse before I go looking for solutions to obscure errors like this :-/
These kind of situations can occur if your workspace went into a bad state or eclipse was unable to properly save state during last exit of workspace.
Try Project > Clean and clean all projects and rebuild all. See if this helps.
Clean all your projects. Then update Eclipse. Then restart of Eclipse. Then restart your development PC.
This happens to me sometimes too, I follow these steps and the problem always goes away.
If none of the other answers works, one brute force suggestion which sometimes resolves weird issues like this would be:
Close your Eclipse
Delete the .metadata folder inside your Workspace folder
Restart Eclipse
Note: This way you're going to lose all your workspace configuration. I advise you to backup it first in case it doesn't works.

Cannot convert project... Premature end of file error in Intellij IDE

I am using Intellij IDEA as an IDE for running Java programs. Dues to power fluctuation computer got restarted. Now when I launch the IDE after reboot i am getting the error Cannot convert project: /home/aniket/IdeaProjects/JavaDemoCodes/.idea/workspace.xml: Error on line -1: Premature end of file.
Has anyone encountered this situation before? What can I do to view my project back again?
I also had this after a power failure, I simply deleted the workspace.xml file from the projects .idea folder, restarted IntelliJ and it seemed to be OK apart from loosing which files were open.
Cheers,
Nick
I had this exact error when my laptop bluescreened. I solved it by:
Exit IntelliJ IDEA
Rename .idea folder
Start IntelliJ IDEA
Create new project from existing sources
Exit IntelliJ IDEA
Copy all files from old .idea folder to newly created one.
Restart IntelliJ IDEA
Finally solved the problem. Hers is the solution. First of all I had two Intellij IDEA projects open in two separate windows.
One was the project which had corresponding subversion repository. This was a file-based format project. Files that define a project are .iws, .ipr and .iml. .iws is the one corresponding to the workspace configuration. I just reverted back this file with svn revert project.iws and I could launch my project again.
But the problem in second project JavaDemoCodes still persisted as it was custom project I created and it looks by default we get a directory-based format project instead of file-based format project. This has all its configurations in /home/aniket/.IdeaIC12 directory. As many of you suggested i searched for workspace.xml here but could not find it. I tried find . -name *.xml but i still could not find it(Also as the error suggests there is no file /home/aniket/IdeaProjects/JavaDemoCodes/.idea/workspace.xml ).Finally I did import project from my first project(the one with svn repo) it detected my JavaDemoCodes project as Intellij IDEA project and let me open it in new window.
Not sure if this is the perfect answer but it solved my problem and yes as someone suggested I deleted .iws file from my 1st svn repo based project and tried to restart but was of no help. New .iws file was created but it still gave me the same error.
I have experienced this same problem. It happens to me when I have IntelliJ open and for whatever reason (usually problems with having multiple VPN connections open), my computer freezes and I have to do a forced re-boot.
My solution is to use Windows 7 restore. I'll go to the folder it is complaining about, right click on it, and do a restore. If I'm lucky, I have a restore point only a few days old.
For me, rebuilding my configuration on several projects from scratch is too time consuming. Using a restore point from a few days or even a week makes more sense.
Good luck.
I solved it just by creating a new project, then starting it and then reopening the old project..

Eclipse get hang after some time with error of java

I am using Eclipse Juno for android development purpose.
I am working on the project contain 4-5 library in it. Do know what is the reason but after several use of that same project My Eclipse get hang. Another thing is it only get hang while i am trying to run the app from eclipse.
After that my Eclipse get stop working and in Not Responding condition. When i click on that, I got below message by closing of Eclipse.
Message:
I don't know what is the reason for causing of this. Please help me regarding this issue.
It is because of a corrupted workspace. For, solution refer
this
The error was due to a corrupt workspace. As I disable the workspace check in the startup I couldn’t select another workspace since Eclipse wouldn’t start. Rename the workspace e.g. to “workspace1″. Eclipse will start and create a new uncorrupted workspace and work without any problems. Afterwards you can import your project into your new workspace and in the end remove the old corrupted workspace.
So, you have to create a new workspace
The most common reason I've seen Eclipse crash is due to running out of memory. Try editing the eclipse.ini file in your Eclipse installation directory, and changing the part where it says -Xmx512m to -Xmx1g (or 2g, if you have a lot of free memory on your system). You can also increase -Xms40m to -Xms512m or similar to make Eclipse start with more allocated memory initially.
Close your project from eclipse and try again. If it doesn't work, copy your projects into a new workspace and open them from there

Netbeans build fail from time to time

I am a NetBeans user since 2009, but now I'm facing some problems that I can't explain. My project has dependencies on some other projects, and they have dependencies on some other projects (it's a big thing) and when Cleaning and Building, sometimes I have this result:
http://pastebin.com/gigXVLsc
I have nothing opened that could block this deletion. Also, if I click to Clean and Build again (just after this fail) I manage to do the operation.
http://pastebin.com/mzuvqM0R
I don't know what's causing this, maybe I should delete everything and link all the projects again?
I'm under Windows 8 64 bits using Netbeans 7.2
We've been having this issue with NetBeans since the late version of 6 and above.
After much hunting and reading, I added -J-Dorg.netbeans.modules.masterfs.watcher.disable=true to the netbeans_default_options of the etc/netbeans.cfg in the NetBeans installation folder.
While this has not ridden me of the issue entirely, it has significantly reduced the issue.
Goto you're Netbeans installation location, open the netbeans.cfg in you the etc folder.
Find the netbeans_default_options (make a copy of the exitsting option and add a # to the start of the line to comment it out`
Add -J-Dorg.netbeans.modules.masterfs.watcher.disable=true to the end of the line (making sure it's within in the quotes)
Restart NetBeans...
Hope this helps reduce the issue.
Seems while cleaning your server is running and that is not allowing you to delete certain .jar file, or somehow those jar files are occupied

Netbeans 7.1 running old codes rather than new ones

Ok, this is really weird. I wrote some codes a day ago, and then edited the codes. Then after hours and hours of editing and rewriting and introducing new classes, I ran the codes, but then I go a response from a "System.out.println()" line that I had long removed. Basically, netbeans seems to be running a much older build of my codes. I've cleaned and re-built my codes and still nothing. It keeps running old codes.
What's going on?
In Neatbeans by default settings will run your new code, even if you not build the project again (given that you have not modified the build settings). You can clean and Build the project again. If this also not works, just back up your codes and create a new project and include the source codes and run the project.
Maybe you can try to clear netbeans cache
close NetBeans
delete cache folder (/home/user/.cache/netbeans)
open the project and wait for scanning project to finish
I had similar problem. I hit "Clean and Build", and then "Run", and it worked.
if clean and build didn't do the work for you try SHIFT+F6 rather than just F6 as a shortcut for RUN .That was the case for me and it works now just fine.
Well, Clean it well! Check for any read only folders in your bin that prevent overwriting of class file. Go to classes folder and check date and time class files got modified.

Categories