解决Mac启动Eclipse Memory Analyzer报错问题

简介: 转载至https://www.jianshu.com/p/9bbbe3c4cc8b

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


!SESSION 2017-05-13 15:25:56.717 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=zh_CN
Framework arguments:  -keyring /Users/sailfish/.eclipse_keyring -showlocation
Command-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 1
java.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 content
under the current working directory when the platform is launched.  Use the -data parameter to
specify 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.<init>(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.<init>(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之前,否则启动还是不成功
相关文章
|
6月前
|
定位技术
Mac电脑报错“托管配置文件格式不正确”的解决方法
Mac电脑报错“托管配置文件格式不正确”的解决方法
317 1
|
Java Android开发
Eclipse里面导工程的时候报错faceted project problem
Eclipse里面导工程的时候报错faceted project problem
|
2月前
|
Java Android开发
eclipse导入项目时,报错:One or more cycles were detected in the build path of project ....
eclipse导入项目时,报错:One or more cycles were detected in the build path of project ....
147 3
|
2月前
|
数据采集 中间件 关系型数据库
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
|
6月前
|
iOS开发 MacOS
MAC OS更新系统后IDEA中的SVN报错无法使用
MAC OS更新系统后IDEA中的SVN报错无法使用
|
3月前
|
TensorFlow 算法框架/工具 Python
【Mac 系统】解决VSCode用Conda成功安装TensorFlow但程序报错显示红色波浪线Unable to import ‘tensorflow‘ pylint(import-error)
本文解决在Mac系统上使用VSCode时遇到的TensorFlow无法导入问题,原因是Python解析器未正确设置为Conda环境下的版本。通过在VSCode左下角选择正确的Python解析器,即可解决import TensorFlow时报错和显示红色波浪线的问题。
155 9
|
3月前
|
JavaScript Linux iOS开发
【Mac系统】Vscode使用LeetCode插件报错‘leetcode.toggleLeetCodeCn‘ not found
在Mac系统下使用VSCode的LeetCode插件时遇到“leetcode.toggleleetcodecn”命令找不到的错误解决方法,主要是通过从Nodejs官网下载并安装最新版本的Node.js来解决环境配置问题。
230 0
|
6月前
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
使用mac版本试用版Beyond过期报错,反复提示要注册的提示信息问题,暂时没有解决方案
111 1
|
6月前
|
Docker 容器
mac构建Docker镜像报错failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpec
mac构建Docker镜像报错failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpec
281 0
|
6月前
|
开发工具 iOS开发 Perl
mac电脑升级到10.15.7含有支付宝SDK的组件更新报错:AlipaySDK.framework/AlipaySDK for architecture arm64
mac电脑升级到10.15.7含有支付宝SDK的组件更新报错:AlipaySDK.framework/AlipaySDK for architecture arm64
91 0

推荐镜像

更多
下一篇
无影云桌面