博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决Mac启动Eclipse Memory Analyzer报错问题
阅读量:6539 次
发布时间:2019-06-24

本文共 4451 字,大约阅读时间需要 14 分钟。

下载Eclipse Memory Analyzer在mac上打开的时候出现以下异常:

 
!SESSION 2017-05-13 15:25:56.717 -----------------------------------------------eclipse.buildId=unknownjava.version=1.8.0_111java.vendor=Oracle CorporationBootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=zh_CNFramework arguments:  -keyring /Users/sailfish/.eclipse_keyring -showlocationCommand-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/sailfish/.eclipse_keyring -showlocation!ENTRY org.eclipse.osgi 4 0 2017-05-13 15:25:58.676!MESSAGE Application error!STACK 1java.lang.IllegalStateException: The platform metadata area could not be written: /private/var/folders/k4/knjt7v5x59l25z_tqmvg094r0000gn/T/AppTranslocation/3CBB3175-DD9A-4A3A-B93F-898BA4445384/d/mat.app/Contents/MacOS/workspace/.metadata.  By default the platform writes its contentunder the current working directory when the platform is launched.  Use the -data parameter tospecify a different content area for the platform.        at org.eclipse.core.internal.runtime.DataArea.assertLocationInitialized(DataArea.java:61)        at org.eclipse.core.internal.runtime.DataArea.getStateLocation(DataArea.java:129)        at org.eclipse.core.internal.preferences.InstancePreferences.getBaseLocation(InstancePreferences.java:44)        at org.eclipse.core.internal.preferences.InstancePreferences.initializeChildren(InstancePreferences.java:199)        at org.eclipse.core.internal.preferences.InstancePreferences.
(InstancePreferences.java:59) at org.eclipse.core.internal.preferences.InstancePreferences.internalCreate(InstancePreferences.java:209) at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:391) at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:379) at org.eclipse.core.internal.preferences.PreferencesService.createNode(PreferencesService.java:389) at org.eclipse.core.internal.preferences.RootPreferences.getChild(RootPreferences.java:63) at org.eclipse.core.internal.preferences.RootPreferences.getNode(RootPreferences.java:101) at org.eclipse.core.internal.preferences.RootPreferences.node(RootPreferences.java:90) at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:38) at org.eclipse.core.runtime.preferences.InstanceScope.getNode(InstanceScope.java:80) at org.eclipse.ui.preferences.ScopedPreferenceStore.getStorePreferences(ScopedPreferenceStore.java:229) at org.eclipse.ui.preferences.ScopedPreferenceStore.
(ScopedPreferenceStore.java:133) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(AbstractUIPlugin.java:288) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:620) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.mat.ui.rcp.Application.start(Application.java:26) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
  • 原因

    /private/var/folders/k4/knjt7v5x59l25z_tqmvg094r0000gn/T/AppTranslocation/3CBB3175-DD9A-4A3A-B93F-898BA4445384/d/mat.app/Contents/MacOS/workspace/.metadata是只读文件

  • 解决方案:

1.邮件点击mat.app,选择显示包内容
216f5c463487783a0c45847a6e5f50f61f4fddc2
2.进入eclipse文件夹,打开 MemoryAnalyzer.ini
3.添加data相关信息
-data/Users/didi/mat-log
4.再次打开mat即可正常使用
  • 注意事项

    • data参数和路径必须在两个不同的行
    • data参数必须放在Laucher之前,否则启动还是不成功

转载地址:http://pvpdo.baihongyu.com/

你可能感兴趣的文章
WSDP
查看>>
Memory Management
查看>>
The Packaging Process in Yocto/OE
查看>>
JQUERY 对 表格中的数据重排序
查看>>
程序员常用借口指南
查看>>
关于PXE网络安装linux系统中碰到的个别问题
查看>>
awk 常用方法
查看>>
Android网络框架实现之【Retrofit+RxJava】
查看>>
Android文件的加密与解密
查看>>
SOAP webserivce 和 RESTful webservice 对比及区别
查看>>
【原】记录一句话
查看>>
Android标题栏,状态栏
查看>>
Windows下安装Memcached for PHP
查看>>
hdu 1040 As Easy As A+B
查看>>
java笔记:SpringSecurity应用(二)
查看>>
php记录代码执行时间
查看>>
【C】strcpy()需谨慎使用;
查看>>
用Adobe Flash Professional CS6创建一个iOS应用程序
查看>>
简简单单几段代码让自己变成最合格的网站管理员
查看>>
Slim Text 0.0.9 发布, 代码开源!
查看>>