在安卓工程中运行Java ,会报以下错误:
Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:136), pid=11252, tid=10964
# fatal error: Invalid layout of preloaded class
#
# JRE version: (7.0_51-b13) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# E:\git\PhoneApp\hs_err_pid11252.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
参考:
http://chenhao518g.blog.163.com/blog/static/34069748201241123345252/
右击有main方法的类 ===> Run as ===> Run Configurations ===>双击java application ===> 单击有main方法的类 ===>
选中classpath选项卡 ===> remove掉Bootstrap Entries下的android.jar ===> 然后点击advanced===> Add Library==>JRE System Library ===>next==>最后finish==>Run