Accepted answer

disclaimer: this will delete all of your eclipse workspace settings and you will have to re-import all your projects, there are less destructive answers here

try the following:

  1. delete the .metadata folder in your local workspace (this is what worked for me). it seems that it contains a .lock file that if not properly closed, prevents eclipse from starting properly. on unix based systems you can type following on command line;

    rm -r workspace/.metadata
  2. delete your .eclipse directory in your home directory. launch eclipse. if that doesn't work,

  3. open eclipse under another user account. if it loads, you know the problem is with your account, not your eclipse installation.


none of the solution helped me for my case.

i found the working solution though. i read that this happens when adt plugin is not updated properly in eclipse.

from eclipse. . .
1. go to help tap
2. click check for updates

update everything and whoa! no longer freezing at starting eclipse!


i didn't try all these. i restarted by laptop/machine . and everything was back to normal after that.


there are many possible reasons for this sort of behaviour. in addition to running from a shell prompt as you have, it's worth looking for clues in your workspace log file, which is the file .metadata/.log under your workspace directory—the npe that's coming up for you looks like it could have to do with the logging code itself, but the log may still help determine what was going on before the error.

web searches for messages you find often yield suggestions for deleting various directories or files and starting again. i've sometimes been able to just remove parts of .metadata/.plugins/org.eclipse.ui.workbench/workbench.xml, though, for less destructive solutions.


the trouble with deleting files in .metadata directory is that you would have to start your workbench from scratch. so, it might take awhile to restore all your projects, especially if you have a number of them. restoring .metadata from a backup just by replacing the existing files with the old backed up ones worked for me.


it might also help to try to load and save the workspace with a newer eclipse version:

i am using eclipse 3.8. when starting up the splash screen would hang. there were no error messages in the log. what helped was to open the workspace with eclipse 4.2.2. after opening and closing the workspace i was able to load it again with 3.8.


after some investigation about file dates i solved the same issue (which is a randomly recurrent trouble on my kepler) by simply deleting the following file in my local workspace: .metadata.plugins\org.eclipse.jdt.core\variablesandcontainers.dat

with negligible impact on the workspace restoring.

i hope it can help someone else...


in your workspace you will find hidden folder name .metadata in which you will find another hidden folder ".mylyn" delete it and empty your trash go to task manager stop the process of eclipse and start again eclipse this time it will work.



here's a less destructive method that worked for me:

i'm on windows machine with a copy of spring tool suite (an extension of eclipse) which i'm running from a random directory. in my command line prompt, i had to navigate to the directory which contained my sts.exe and run: sts.exe -refresh.

after that, i could open my eclipse the normal way (which was through a pinned taskbar icon).


get a backup copy of the .metadata/.plugin/org.eclipse.core.resources folder, then delete that folder and launch eclipse. that should launch the workspace, but all projects will be gone as org.eclipse.core.resources keeps a list of all projects.

next, close eclipse properly and copy back org.eclipse.core.resources from back up to .metadata/.plugins/ folder overriding the existing one.

open eclipse and things should work fine with all your projects back to normal.


eclipse freezing at startup - before loading workspace very good answer on this post. repeating the answer that worked for me

in your workspace directory perform the following steps:

cd .metadata/.plugins

mv org.eclipse.core.resources org.eclipse.core.resources.bak

start eclipse. (it should show an error message or an empty workspace because no project is found.)

close all open editors tabs.

exit eclipse.

rm -rf org.eclipse.core.resources (delete the newly created directory.)

mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (restore the original directory.)

start eclipse and start working. :-)

answer by charlesb


i had this problem in windows 7, this is what fixed it for me.

cd ~/documents/workspace/.metalog/.plugins

rm -rf org.eclipse.core.resources


you have to delete org.eclipse.e4.workbench folder inside metadata.plugins\ which you can find in your workspace folder. deleting this folder solved the problem for me, hope it helps someone else!


looks like you are possibly having this issue:


deleting workspace/.metadata/.lock and starting eclipse with -clean -refresh worked for me.


following procedure worked on my macos (mavericks) and eclipse luna 4.4.1:

delete .snap file under the path "workspacefolder".metadata.plugins\org.eclipse.core.resources\

if you don't know how to navigate to this folder on mac, press cmd + shift + g (go to the folder) and type the full address you want to navigate for.


pretty old question but the most simple answer isn't yet posted.
here it is :
1) in [workspace]\.metadata\.plugins\org.eclipse.e4.workbench delete workbench.xmi file.
in most cases it's enough - try to load eclipse.
still you have to re-configure your specific perspective settings (if any)

2) now getting problems with building projects that worked perfectly? as of my experience following steps help:
- uncheck projects->build automatically
- switch to java perspective (if not yet): window -> open perspective -> java
- locate problems view or open it: window -> show view -> problems
- right-click on problem groups and select delete. be sure to delete lint errors
- clean the workspace: project -> clean... with option clean all projects
- check projects->build automatically
- if problems persist for some projects: right-click project, select properties -> android and make sure appropriate project build target is chosen

3) it was always sufficient for me. but if you still get problems - try @george post recommendations


i solved deleting *.snap from the workspace dir (and all subdirectories):



no need to delete the entire metadata. just try deleting the .snap file under org.eclipse.core.resources in your workspace folder ex.



the best solution i found is to delete this file: workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench


./eclipse -clean -refresh

as mentioned in comment by sulai dec 20 '12 at 12:46, that worked for me.

however, on the mac os x, i had to figure out how to get to ./eclipse

here's the solution:


thank you andrew's comment for this post:


the procedure shown at worked for me:

  1. cd .metadata/.plugins
  2. mv org.eclipse.core.resources org.eclipse.core.resources.bak
  3. start eclipse. (it should show an error message or an empty workspace because no project is found.)
  4. close all open editors tabs.
  5. exit eclipse.
  6. rm -rf org.eclipse.core.resources (delete the newly created directory.)
  7. mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (restore the original directory.)
  8. start eclipse and start working. :-)

in other answers:

eclipse -clean -clearpersistedstate

is mentioned - which seems to have the same or even better effect.

here is a script for macos (using macports) and linux (tested on ubuntu with eclipse equinox) to do the start with an an optional kill of the running eclipse. you might want to adapt the script to your needs. if you add new platforms please edit the script right in this answer.

# wf 2014-03-14
# ceclipse:
#   start eclipse cleanly
#   this script calls eclipse with -clean and -clearpersistedstate
#   if an instance of eclipse is already running the user is asked
#   if it should be killed first and if answered yes the process will be killed
# usage: ceclipse

# error
#   show an error message and exit
#   params:
#     1: l_msg - the message to display
error() {
  local l_msg="$1"
  echo "error: $l_msg" 1>&2
  exit 1 

# autoinstall
#  check that l_prog is available by calling which
#  if not available install from given package depending on operating system
#  params: 
#    1: l_prog: the program that shall be checked
#    2: l_linuxpackage: the apt-package to install from
#    3: l_macospackage: the macports package to install from
autoinstall() {
  local l_prog=$1
  local l_linuxpackage=$2
  local l_macospackage=$3
  echo "checking that $l_prog  is installed on os $os ..."
  which $l_prog 
  if [ $? -eq 1 ]
    case $os in 
      # mac os
        echo "installing $l_prog from macports package $l_macospackage"        
        sudo port install $l_macospackage
      # e.g. ubuntu/fedora/debian/suse
        echo "installing $l_prog from apt-package $l_linuxpackage"        
        sudo apt-get install $l_linuxpackage
      # git bash (windows)
        error "$l_prog ist not installed"
        error "unknown operating system $os" 

# global operating system variable

# first set 
#  eclipse_proc - the name of the eclipse process to look for
#  eclipse_app - the name of the eclipse application to start
case $os in 
    # mac os
    # e.g. ubuntu/fedora/debian/suse
      eclipse_app=`which eclipse`
    # git bash (windows)
      eclipse_app=`which eclipse`
      error "$os not implemented yet"
      error "unknown operating system $os" 

# check that pgrep is installed or install it
autoinstall pgrep procps

# check whether eclipse process is running
# first check that we only find one process
echo "looking for $eclipse_proc process"
pgrep -fl "$eclipse_proc"
# can't use -c option on macos - use platform independent approach 
#eclipse_count=`pgrep -cfl "$eclipse_proc"`
eclipse_count=`pgrep -fl "$eclipse_proc" | wc -l | tr -d ' '`

# check how many processes matched
case $eclipse_count in
  # no eclipse - do nothing
  0) ;;
  # exactly one - offer to kill it
     echo "eclipse is running - shall i kill and restart it with -clean? y/n?"
       read answer
       case $answer in
         y|y) ;;
           *) error "aborted ..." ;;
     echo "killing current $eclipse_proc"
     pkill -f "$eclipse_proc"
  # multiple - this is bogus
  *) error "$eclipse_count processes matching $eclipse_proc found - please adapt $0";;

echo "starting eclipse cleanly ... using $tmp for nohup.out"
mkdir -p $tmp
cd $tmp

# start eclipse with clean options
nohup $eclipse_app -clean -clearpersistedstate&

Related Query

More Query from same tag