[eclipse] Eclipse internal error while initializing Java tooling

I am getting errors from Eclipse Indigo running on Windows 7 Ultimate. For each of the following items:

Android SDK content loader
Building workspace
Initializing Java Tooling
Loading data for Android 2.3.3
Loading data for Android 4.03

this error is thrown:

 An internal error occurred during: "Initializing Java Tooling".java.lang.NullPointerException

What should I do?

This question is related to eclipse

The answer is


Just close the Eclipse or STS and restart it again. This may fix this error.


Just change the following values at "eclipse.ini" file to the following:

-Xms1024m
-Xmx2048m

Note:

  • You can find the "eclipse.ini" file by right click eclipse icon on and select "Open file location".
  • This error occurs because the eclipse is running out of memory, so we just increased the assigned memory for the eclipse application.

In my case even after deleting the workspace and reimport doesn't work. Because all the files are Corrupted. so have utilized my existing backup data, extracted it & reimported into workspace then it started working fine.


Just delete the .metadata on workspace, and restart IDE and configure it again properly


Sometimes the issue is with the version of the Java installed. I was facing a similar issue when trying to start Spring Tool Suite on my Ubuntu 16.04. I had java 9 installed on my machine. I changed it to java 8. And it started working.


In my case "MySQL service" is disabled. And I got same error.

So if you are using MySQL then check for it.

Press win+R then write services.msc and hit enter. Search for MySQL service. Start the service.


My problem too got fixed which i was getting on STS, just closed all the project's including the server on the project explorer, restarted ide, that's it.


check the Eclipse log (the intelligently named ".log" file in your workspace .metadata folder) and check for the complete stacktrace. In my case it was caused at method "org.eclipse.m2e.jdt.internal.MavenClasspathVariableInitializer.initialize(MavenClasspathVariableInitializer.java:30)" which lead to a never fixed "race condition during startup" bug. I would really recommend dumping Eclipse in favor of a more serious IDE; like IntelliJ or Netbeans. Using Eclipse means that you will invest 40-50% of your time trying to work around this kind of bugs, instead of being productive.


Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.

Or you can start working on a new workspace, (i.e. change your workspace), then try to import your project from the old workspace


In my case, I had two of three projects with this problem in my current workspace. I opened workspace catalog and made a backup of corrupted projects, deleted them afterwards. Then opened eclipse once again. Obviously there was missing data to work with. Closed eclipse once again and added back earlier saved projects without metadata catalogs.

TL;DR. Just remove metadata catalogs from projects in your workspace.


I was facing the same issue in eclipse so I am telling you the same step that I did you just need to go eclipse installed folder where you will find the file named eclipse.ini in my case the location was

C:\Users\comp\eclipse\jee-2018-12\eclipse

you can find your location.

in that location, open eclipse.ini in text mode and there you will find some below text
-Xms256m -Xmx1024m

change it to

-Xms512m -Xmx1024m

I hope that will help you 100% as checked in my System ;-)


I would just like to add, that simply closing and reopening eclipse has always worked for me with this type of error.


  1. Close Eclipse.
  2. Go to workspace folder in windows explorer and delete following folders:
    • .metadata
    • .recommenders
    • RemoteSystemsTempFiles
    • Servers
  3. Open Eclipse and provide the same workspace folder again during launch.

My issue was caused by some old Java projects using an old JRE System Library, so all I had to do was remove the old library and add the new one by right clicking the project -> Properties -> Java Build Path -> Libraries -> Add Library.

enter image description here


NO Need to create another work-space and import all the projects from the older one : Just empty \Workspaces\MyEclipse 8.5 M2\.metadata\.plugins\org.eclipse.core.resources\.projects directory and restart myeclipse/eclipse


In my case, I restarted my eclipse IDE without deleting/editing my workspace or .metadata folder. Error "An internal error occurred during: "Initializing Java Tooling". java.lang.NullPointerException" is gone and Eclipse just working good.


I faced the same issue. But changing two configuration in eclipse.ini resolved my issue.

-Xms512m to -Xms1024m and -Xmx1024m to -Xmx2048m


In my case, Eclipse tried to launch with non-existing workspace folder. Sure the folder is created at the moment, but the exception is occured durring creating the workspace. After the exception I just switched workspace to the right folder. To avoid slipping to non-existing workspace folder I deleted it from Recent workspaces.


  1. Check your Project -> Properties -> Java Build Path has JDK Library instead of JRE System Library.

  2. Go to Eclipse installed directory, Search eclipse.ini -> Open it

Search lines for containing any below values:

-Xms512m -Xmx512m -Xms1024m -Xmx1024m -Xms1G -Xmx1G

Just double it the memory size, Assume you have to change the

-Xms512m to -Xms1024m

Increasing the eclipse memory size will help eclipse to gain more RAM size from your PC.


I faced the same issue. Switching back to the predefined work-space from the Switch workspace option in eclipse solved my issue.