简体   繁体   English

安装 Mac OS X Sierra (Mac OS 10.12) 后 Eclipse scala-ide 无法启动

[英]Eclipse scala-ide won't start after installing Mac OS X Sierra (Mac OS 10.12)

Eclipse quit Unexpectedly error is showing up. Eclipse 退出 意外出现错误。

Process: eclipse [1612] Path:进程:eclipse [1612] 路径:
/Applications/Eclipse.app/Contents/MacOS/eclipse Identifier: /Applications/Eclipse.app/Contents/MacOS/eclipse 标识符:
scalaide.product.id Version: 1.0.0 (1.0.0.201605041117) Code Type: X86-64 (Native) Parent Process: ??? scalaide.product.id 版本:1.0.0 (1.0.0.201605041117) 代码类型:X86-64(本机)父进程:??? [1] Responsible: eclipse [1612] User ID: 501 [1] 负责人:eclipse [1612] 用户名:501

Date/Time: 2016-11-05 08:25:36.767 +0530 OS Version:日期/时间:2016-11-05 08:25:36.767 +0530 操作系统版本:
Mac OS X 10.12 (16A323) Report Version: 12 Anonymous UUID: Mac OS X 10.12 (16A323) 报告版本:12 匿名 UUID:
756B4B0B-5772-3B0B-F072-86AA384C8784 756B4B0B-5772-3B0B-F072-86AA384C8784

Sleep/Wake UUID: 9458E0FB-8ADB-4FF1-AF46-A0CE9A6FC72D睡眠/唤醒 UUID:9458E0FB-8ADB-4FF1-AF46-A0CE9A6FC72D

Time Awake Since Boot: 6100 seconds Time Since Wake: 3100 seconds启动后唤醒时间:6100 秒唤醒时间:3100 秒

System Integrity Protection: enabled系统完整性保护:已启用

Crashed Thread: 0 Dispatch queue: com.apple.main-thread崩溃线程:0 调度队列:com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:异常类型:EXC_BAD_ACCESS (SIGSEGV) 异常代码:
KERN_INVALID_ADDRESS at 0x000000000000003c Exception Note: KERN_INVALID_ADDRESS 在 0x000000000000003c 异常注意:
EXC_CORPSE_NOTIFY EXC_CORPSE_NOTIFY

I installed the new Mac Sierra & installed the latest scala-ide (scala-SDK-4.4.1-vfinal-2.11-macosx.cocoa.x86_64.zip) but its showing above error on opening the application.我安装了新的 Mac Sierra 并安装了最新的 scala-ide (scala-SDK-4.4.1-vfinal-2.11-macosx.cocoa.x86_64.zip),但在打开应用程序时显示上述错误。

I also faced the same issue in sierra.我在 sierra 也遇到了同样的问题。 There seems to be some issue with unzipping in sierra.在 sierra 中解压缩似乎存在一些问题。 Both double click as well as unzip command.双击以及解压缩命令。 I ended up using windows (i had windows VM in VMFusion) and used 7zip to uncompress the zip.我最终使用了 Windows(我在 VMFusion 中有 Windows VM)并使用 7zip 来解压缩 zip。 After that, it open properly in Mac.之后,它在 Mac 中正常打开。

I have a workaround if you find interesting:如果您觉得有趣,我有一个解决方法

brew install Caskroom/cask/scala-ide

It worked for me and installed the version 4.4.1 on macOS Sierra 10.12.1.它对我有用并在 macOS Sierra 10.12.1 上安装了 4.4.1 版。

Note : You will need to have brew installed so for instructions on that check this url: http://brew.sh .注意:您需要安装 brew,以便查看此网址的说明: http : //brew.sh

I didn't dig deep into this, but it looks like it may be an error of the Mac OS X utility that automatically compresses files.我没有深入研究这个,但看起来这可能是自动压缩文件的 Mac OS X 实用程序的错误。 I have downloaded the zip, uncompressed it via unzip, and it worked (launched via command line).我已经下载了 zip,通过解压缩对其进行解压缩,并且它工作正常(通过命令行启动)。

I was having same issue with Eclipse Kepler when double clicking to unzip a .tar.gz file.双击以解压缩 .tar.gz 文件时,我遇到了与 Eclipse Kepler 相同的问题。 The above reference about using Terminal worked for me.以上关于使用终端的参考对我有用。

Instead of double clicking to unsip a .zip or a .tar.gz file, try using Terminal to cd to the same directory as the downloaded file, and run command不要双击取消 .zip 或 .tar.gz 文件,尝试使用终端将 cd 到与下载文件相同的目录,然后运行命令

For a .zip file: unzip -a foo.zip对于 .zip 文件: unzip -a foo.zip

For a .tar.gz file: gunzip -c foo.tar.gz |对于 .tar.gz 文件: gunzip -c foo.tar.gz | tar xopf -焦油 xopf -

while replacing 'foo' with name of your downloaded file.用您下载的文件名替换“foo”。

I was also required to download and install legacy Java 6 runtime.我还需要下载和安装旧版 Java 6 运行时。

Reference: http://magma.maths.usyd.edu.au/magma/faq/extract参考: http : //magma.maths.usyd.edu.au/magma/faq/extract

Scala IDE is not compatible with Java SE 9 and higher versions. Scala IDE 与 Java SE 9 及更高版本不兼容。 You might need to downgrade or install Java SE 8 in order to fix the issue.您可能需要降级或安装 Java SE 8 才能解决此问题。

Lets go through each step how you can fix it.让我们来看看如何修复它的每一步。

Step 1. Check what version of Java you have installed on your machine.步骤 1.检查您的机器上安装的 Java 版本。

Run this command in your terminal: /usr/libexec/java_home --verbose在终端中运行此命令: /usr/libexec/java_home --verbose

在此处输入图片说明

As you can see I have three different versions of java running on my machine.如您所见,我的机器上运行着三个不同版本的 java。

Step 2 : Install Java SE 8 (jdk1.8) if you don't find it in your list.第 2 步:如果您在列表中没有找到 Java SE 8 (jdk1.8),请安装它。 Refer this blog for java installation steps.有关 Java 安装步骤,请参阅此博客

Step 3: Now open your .bashrc file (run command: vi ~/.bashrc ) and copy-paste below line in your bashrc file.第 3 步:现在打开 .bashrc 文件(运行命令: vi ~/.bashrc )并复制粘贴到 bashrc 文件中的以下行。

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

Step 4: Save the file (:wq!) and reload your profile ( source ~/.bashrc )第 4 步:保存文件 (:wq!) 并重新加载您的配置文件 ( source ~/.bashrc )

Step 5: Now you need to define eclipse.ini arguments in order to use Java 1.8 version.第 5 步:现在您需要定义 eclipse.ini 参数以使用 Java 1.8 版本。 On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Scala IDE executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the Eclipse folder under Contents.在 Mac OS X 系统上,您可以通过右键单击(或 Ctrl+单击)Finder 中的 Scala IDE 可执行文件,选择 Show Package Contents,然后在 Contents 下的 Eclipse 文件夹中找到 eclipse.ini 来找到 eclipse.ini。

在此处输入图片说明

The path is often /Applications/Scala IDE.app/Contents/Eclipse/eclipse.ini路径通常是/Applications/Scala IDE.app/Contents/Eclipse/eclipse.ini

Step 6: Open it with text editor and copy-paste below line in eclipse.ini file.第 6 步:用文本编辑器打开它并复制粘贴到eclipse.ini文件中的下面一行。 Change the version (if needed) according to your java version.根据您的 Java 版本更改版本(如果需要)。 Mine is 1.8.0_171.我的是 1.8.0_171。

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin

Step 7: Save the file and exit.步骤 7:保存文件并退出。

Step 8: Run the Scala IDE application now and it should run:第 8 步:现在运行 Scala IDE 应用程序,它应该会运行:

在此处输入图片说明

Reference: Website参考: 网站

Facing the same error using macOS 10.12.5.使用 macOS 10.12.5 时遇到同样的错误。 Tried using different unzipped and home-brew.尝试使用不同的解压缩和自制程序。 Finally made it: Installed it using brew cask install scala-ide .终于成功了:使用brew cask install scala-ide安装它。 Changed the default workspace to "workspace_new" when getting asked at the first start.在第一次启动时被询问时将默认工作区更改为“workspace_new”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM