Fatal Error: Invalid Layout of java.lang.String at value

I got an extremely annyoing error in Eclipse (in the console):

Invalid layout of java.lang.String at value

A fatal error has been detected by the Java Runtime Environment:

Internal Error (javaClasses.cpp:129), pid=15238, tid=140306591237888
fatal error: Invalid layout of preloaded class

 JRE version: 7.0_07-b10
 Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode linux-amd64 compressed ops)
 Failed to write core dump. Core dumps have been disabled. To enable core dumping, try ulimit -c unlimited" before starting Java again

 An error report file with more information is saved as:

 If you would like to submit a bug report, please visit:

Log Download

I cant’t make any sense of this, because even Eclipse doesn’t display any errors (in the code editor)…
This is a real productivity-killer, because it blocks all progress.
If anyone has any ideas on how to solve this, please answer this question.

Thank you really much in advance,


Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

In case of an Android project, you have to remove Android Lib from the launch configuration for that specific class. Use the “walkthrough” below as a guide.

  • Project->Properties->Run/Debug Settings;
  • Select your Class and click “Edit“;
  • Open the tab “Classpath” and remove Android Lib from “Bootstrap Entries“;
  • Apply everything and Run the class again.

Solution 2

I had same problem,then(as Jeff Schultz said here) I tried:

Run As -> Android Application

and problem solved.But I don’t know the reason that causes this problem.I hope this help you!

Solution 3

This happened to me after:

  1. Inserting a class in the Android Application project where I had forgotten to remove public static void main(String args[]) function. (Had previously performed a quick test of the class).
  2. Tried to run the Application while I had opened and focused the above class on Eclipse editor.

The funny thing was that, after the Eclipse error, no matter on what class I switched the focus on, when I was trying to run the application again, I was stuck with the same error.

Inspired by Odyr Sohn solution, I managed to solve the problem (from Project->Properties->Run/Debug Settings deleting the faulty Launch configuration), but as soon as I was trying to run the application from this class, the same thing was happening again. When I removed public static void main(String args[]) function from the class, the problem was solved for good.

Solution 4

You should make a run configuration for an “Android application”. If you make it for “Java Application” by mistake this error will show.

Solution 5

Same thing happened to me. I created a TestActivity and I guess it had a public static void main(String args[]) function. I went into the properties and then the Run/Debug and deleted TestActivity and it worked just fine.

Solution 6

I had the same problem, solved it by:

Run->Run Configurations;

Click on left on “Android Application”-> Button on top “New”;

then type in a name and “Browse” the Project -> works!

Solution 7

I had a similar problem on the fatal error: Invalid layout of preloaded class with Kepler Service Release 1 using windows 7.

Project -> Properties -> Java Build Path -> Order and Export --> check mark any 
unchecked library or Android version and then hit OK. Then run as Android application.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply