I have so many projects in workspace. for every one or two weeks i have to search for *.snap file delete them. otherwise my eclipse will take lot of time to come up? So curious to know what are they? are they specific to java? as i have lots of java projects in my workspace?
*.snap files represent the changes in workspace state of the IDE during the runtime. This is mostly for eclipse crash recovery plan. When a crash happens these files are used to recover the state fo eclipse workspace.
It looks like your eclipse platform is crashing quite often. Because otherwise, the snapshot files should not be there while the platform is not running. As the referenced page in roe's comment explains, they are just needed for crash recovery and are deleted during normal shutdown of the platform. Deleting them will make eclipse think, that no crash occurred but then it can't recover and you may have to refresh/rebuild your workspace (which may take the same time).
I'd not delete those files except eclipse won't recover from a crash. Have a look at the eclipse workspace and platform log files if you have troubles with some plugins and fight the problem from this side (updating plugins or sending error reports) instead of deleting those files.
A very good solution for me was to:
Cut and Paste the .snap file in a separate folder
Start and then Close Eclipse (after restarting I've noticed that some of my classes where not there)
Put back the .snap file in the original place
Start again Eclipse
Related
I'm trying to figure out which files to check in to version control when using Eclipse for Android development. I have a workspace with a single project. I found this which suggested that the .metadata folder did not need to be controlled (minus the comment there about launch params, however I don't mind re-picking those again on a different machine).
If I remove the .metadata folder then open Eclipse the project is no longer shown. I searched for posts on this symptom and they suggest re-importing the project. This solution doesn't make sense here, I'm trying to check in whatever is needed so another developer can open the workspace and see the project and work on it. Having them move the project then re-import it would be a bit messy.
So which files should I be version controlling so that someone else can get the latest and be able to open the project without controlling a bunch of user specific preferences?
I have had similar experience using Eclipse for version control, and decided to quit using it because it is very annoying and buggy. Now, for git, I use SourceTree, which I prefer over eclipse version control. I think you should version control the source code folders, along with configurations, and other files you program needs to function, but never the executable files. If the other person is using Eclipse, for easiness, it is good idea to include the .classpath configuration file. If not, then the other person would need to clone the repository and make the required changes so that it works with his/her IDE.
I think I've settled on the following approach. This seems to work well so far and avoids some of the headaches mentioned in my original question.
1) each developer creates an Eclipse workspace on their machine somewhere, outside of version control; only the project directory is checked into version control - the workspace is completely uncontrolled
2) developers checkout the project directory from version control (in a different directory structure than where the workspace was created) and then use File >> Import, but they leave the "copy into workspace" unchecked.
So with the above, you can checkout from version control and work with the files right where they were checked out. There's no need to move them out then import them back in. When you import with the copy option unchecked, the workspace (which itself is not controlled) is just referencing the files where they're at on disk.
The only minor downside is that any workspace stuff has to be setup individually. Other articles mention controlling the launch params, but so far this hasn't been an issue - pretty easy to pick that once the first time you launch.
So anyway, hopefully this helps someone else :) This seems to be a reasonably smooth way to do it and avoids the issues we ran into initially.
Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.It's weird because it shows that it has errors only in the window bar, and not in the Navigator. I don't have any Java errors, this is a valid project that was fine all the time:
Some of the errors on the error log of Eclipse:
JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure
Cannot connect to VM
File <SomeFile> has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Internal error
When I run an application from this project, I get a warning message but when I proceed, it works fine, but still. It's very disturbing and I'm not sure if it's harmless.
I tried to:
Restart Eclipse
Restart my machine
Clean projects and recompiling them.
Refresh projects
Pray
Nothing helped. What could be the problem? (I'm using Indigo Service Release 2)
The following nuclear option has desperation written all over it. But I have been where the OP has been with the Juno version of Eclipse.
Run a "Synchronize with Repository" and save all of your local updates to a different directory.
Delete the project. (Check the box to delete the contents on disk. Scary step, but that's OK, because you saved it in a different directory in the previous step, right?)
Read in a fresh project from the repository. It builds happily at this point.
Integrate your local updates.
Keep on praying.
Looks that one unused JAR was deleted, but for some reason, I didn't get errors in any file, even in the files that imports this JAR! So what I did was restoring this JAR, delete unused imports and deleted the JAR again.
I've found this error after two days of navigating on this project on each file.. This is weird that Eclipse didn't recognize that1 this is an error, and throw many unrelated errors such as:
Cannot connect to VM
File has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Is this a bug in Eclipse? (All errors and warnings are enabled!)
1 As seen in the image in the question..
A class from the list of imports for the file seems to have moved out or the jar file containing the class is missing.
Expand the imports section and check if you find some classes that are missing but have been imported.
Though it is a pain, sometimes the easiest solution is to back up all your projects (either in a repository or somewhere else on your computer) then uninstall and reinstall eclipse. No it's not fun, but it should reset eclipse so everything works again. The downfall though is that you have to reconfigure eclipse to any special settings you had/reinatall any extra functionality currently installed (eg. android add-on) and reconnect to any repositories you have. While punting isn't fun, it can be effective... I hope you don't have to resort to this though.
I have went through that problem a lot of times, and tried everything you tried. Rebuild, recompile, refresh, remove and add JDK, remove and reinstall Eclipse... nothing worked
The only thing I concluded is that the workspace metadata was corrupted.
What I did (every time it happened) was
Create an empty workspace
Import -> existing projects into worskpace
Mark the "copy projects" (else it will only link them)
Wait for the copy, and start working with the new workspace
If you work with SCM systems (Git, SVN, etc), making a full checkout will do the trick too, but the worskpace import will let you retrieve those changes you didn't get to commit (if any).
It's a little painful if you have somethings already set (like JDK names, servers, etc), but then I realized it was faster than keep searching how to fix the workspace
Regards!
PS : I've been working with Kepler lately, and everything works fine till now
Click Window -> Show View -> Other -> General -> Problems
This view will show you what is wrong.
Did you, by any chance, update your virtual machine outside of Eclipse? I can't help but feel that we're both missing a finer detail here. I just keep seeing "cannot connect to VM" and thinking that it's a major clue.
Have you tried running anything from the terminal? Does it work there?
If so, do you know where your current edition of Java is located? Is Eclipse looking somewhere else?
Is this exclusive to one project? Do you use any additional libraries to the JDK?
Maybe try this for Resource is out of sync with the file system error:
Right click project in Eclipse Package Explorer
Close Project.
Right click project in Eclipse Package Explorer
Open Project.
Other things not mentioned:
project properties > java build path, see if any of those tabs got changed, local file got moved? read/write permissions on some file you are linking to?
project properties > java compiler, see if workplace settings have changed? maybe under errors/warnings, you can systematically set them to 'ignore' until the error goes away to determine what type of error it is?
maybe update some of the eclipse plugins?
I saw something like this happening for a number of reasons. Mainly because of validation in files other Java source code. See if you are validating XML for instance.
Right click your project and chose Properties (Alt+Enter) and Validation to see the related configuration.
As for the danger, I lived with those marks for ages and nothing wrong ever happened.
While developing Nodeclipse, I found that some bugs don't arise immediately but after some time, when combination of updates, restarts happens.
Is plugin update or uninstall/install really clean?
I develop and use installing for update, then use newer version until I got time/idea to improve. However as said above I ran into situation when Eclipse behaves differently after the new feature have been used for several days.
Is there some information that must be read about plugin install life-cycle, that mentions some not so evident behavior.
UPDATE: Some problem were in Autumn 2013 when we were switching to tycho build. Also around that time Eclipse Kepler 4.3.1 was released.
No, they are not "clean". Moreover when you do uninstall, no files are deleted, Eclipse would just prevent plugin from loading on the startup.
If you really want to remove the plugin you need to
Uninstall it via UI
Delete the plugin files in the file system
Remove plugin settings from workspace or create a new one.
Here is some interesting info for you:
There is no mechanism within Eclipse to permanently and physically
uninstall a feature and its plug-ins. The process to physically and
permanently remove an undesirable feature and its plug-ins is a manual
process that should be done when Eclipse is not running. In order to
do, you will have to manually remove the files there associated with
the feature from the eclipse/features directory and its plug-ins from
the eclipse/plugins directory. Be very cautious as to which files you
delete, and always have a backup of your Eclipse directory. If you
remove the wrong files from these directories, you may have quite some
trouble restoring your Eclipse to a stable state. Therefore, unless
your hard disk storage capacity is extraordinarily limited, it is
recommended that you simply leave the physical files in place.
Note that when manually removing plugins as described above, it is
likely that some metadata will still cached by Eclipse. This can lead
to problems later on. Running Eclipse with the -clean option may help
with that, as it causes Eclipse to clean the cached metadata. See the
Running Eclipse help page for details about this option.
Source: http://wiki.eclipse.org/FAQ_How_do_I_remove_a_plug-in%3F
You cannot do this ideally, because the plugins designed for eclipse leave their temp access files even if they are uninstalled, to do so, you will have to follow the steps:
Uninstall the Plugin: You can use the Eclipse UI directly. Go to Help > About Eclipse > Installation Details, select the software you no longer want and click Uninstall.
Delete the Present temp Files in the System, make sure to re-check the dependencies(Note: Removing Dependent Plugins might cause Eclipse to stop Working).
Remove the plugins from the workspace, or in short you can re-configure a new workspace.
This would be removing the plugins, but removing its traces manually.
ref#Link
I do not know if its just my computer, but netbeans is taking an insane amount of time just to open. I'm wondering is there anything i can do to mitigate this problem.
(Like maybe if i reduce the amount of tabs opened in netbeans it may speed things up or something)
Reinstall from scratch is usually the best way to go. Your netbeans installation is probably slowed down by all the plugins, settings, files, cache, old files, and other stuff that its trying to load at startup. Backup your .netbeans profile folder, delete the old one, download a new netbeans installation (netbeans itself might of collected old files), and restore your settings.
If that doesn't speed things up, then really the only thing you can do is upgrade the computer
You can use "Scan on Demand" plugin.
If your problem has seemingly got worse over time you can delete the .netbeans folder that is placed in your user home directory, this should speed things up in that case.
As a precursor to deleting the .netbeans folder i would run netbeans with a custom home directory
netbeans.exe --userdir
c:\temp\myTestHome\
And see if that fixes the problem... If it does then delete your .netbeans folder, but be warned that it will behave as a new installation after that - ie no settings/plugins that you defined will be present anymore.
delete your home.directory .netbeans folder.e every thing will be fine
. i'm using 7.0 netbeans and it's faster to deploy with tomcat 7.0.6
I have a problem that seems to come up both with autocomplete and quick fix. Sometimes when I use cmd+1 for quick fix dialog, Eclipse freezes and however long I wait (30 min at least), nothing happens. When inspected in activity monitor, it seems to exhibit little to no processor activity.
I have a Mac with OSX 10.6, and Helios with no weird plugins. I program in java, so I use very standard features.
Is this a known bug? I have tried to google a lot to find useful info. I am not very good at reading bug reports though, and the concept of feature freeze kind of taints my search results.
Thanks for any help.
As for Eclipse you can not know what is happening. The whole platform is a set of plugins, and the requirements (for example responsiveness) are not strict for them. So a third party or even a bundled plugin can cause such a failure. So most of times you cannot have a clue about what is wrong. Some stuff you can do:
while hanging unplug your network connection. If you are behind a proxy for example, a plugin can wait for a long time on network io
you can check with for example resource monitor, which file eclipse opened. Some of the opened file handlers can have relation with the problem
edit .classpath file in project where code completion freezes, and it will "reset" your project stuff in eclipse
you can browse .metadata folder in eclipse workspace and you can guess which folder to remove temporaly. After removing, try if error is still present
create a new workspace and import projects into it
if new workspace do not work, then the eror is in configuration folder in eclipse root, and you can play the same thing like in step 4
use a brand new eclipse
+1. Maybe some new plugin is responsible. In eclipse Help/about/installation details/Installation history tab you can revert to some older set of plugins.
Hope it will help.
Seems that you encounter known and already fixed bug.
Issue fixed after deleting all the files in the below directory
configuration\org.eclipse.osgi\.manager
.fileTableLock
.fileTable.1
.fileTable.2
There will be fileTable lock files, delete all those files