简体   繁体   English

Eclipse aarch64 和 OpenJDK (ARM)

[英]Eclipse aarch64 and OpenJDK (ARM)

I'm trying out the Eclipse 4.20 builds available as Mac OSX (64 bit version for Arm64/AArch64) running under macOS 11 on Apple Silicon.我正在试用 Eclipse 4.20 版本,可作为Mac OSX(Arm64/AArch64 的 64 位版本)在 Apple Silicon 上的 macOS 11 下运行。 This version doesn't seem to come with a jdk, so I've assumed I need to handle that myself.这个版本似乎没有附带 jdk,所以我假设我需要自己处理。 I installed 16.0.1-librca from Bellsoft with SDKman (Rosetta2 mode false).我使用 SDKman 安装了来自 Bellsoft 的 16.0.1-librca(Rosetta2 模式为 false)。

I edited the info.plist file of Eclipse like this:我像这样编辑了 Eclipse 的 info.plist 文件:

<key>Eclipse</key>          
<array>
  <string>-vm</string>
  <string>~/.sdkman/candidates/java/16.0.1-librca/bin/java</string>
…(Other stuff here)
</array>

and Eclipse does indeed startup, but crashes right away.和 Eclipse 确实启动,但立即崩溃。 A while after this macOS claims I don't have the permissions to start the app.在此 macOS 声称我无权启动该应用程序后不久。 Results are identical with the Zulu AArch64.结果与 Zulu AArch64 相同。

I typically get我通常得到

"Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000000c" “异常类型:EXC_BAD_ACCESS (SIGABRT) 异常代码:KERN_INVALID_ADDRESS 在 0x000000000000000c”

and

"Application Specific Information: abort() called" “应用程序特定信息:abort() 调用”

in libjvm.dylib.在 libjvm.dylib 中。

This with some variations depending on the setup used.这取决于所使用的设置有一些变化。

Assuming these releases are supposed to work in macOS 11 on Apple Silicon, then it would seem likely this should be possible to get working.假设这些版本应该在 Apple Silicon 上的 macOS 11 中运行,那么这似乎应该可以运行。 Or have I misunderstood the meaning of aarch64 here?还是我在这里误解了 aarch64 的含义? Are these perhaps just versions for jdk developers?这些可能只是 jdk 开发人员的版本吗? I looked over the "Target Environments" for Eclipse and feel unsure what other uses a version labelled as "Mac…for Arm64/AArch64" would have here.我查看了 Eclipse 的“目标环境”,并不确定此处标记为“Mac...for Arm64/AArch64”的版本还有哪些其他用途。

libexec doesn't see the SDKman installed version. libexec 没有看到 SDKman 安装的版本。 When I run java --version in the terminal it does show "openjdk 16.0.1 2021-04-20" and not my main Oracle JDK.当我在终端中运行java --version时,它确实显示“openjdk 16.0.1 2021-04-20”而不是我的主要 Oracle JDK。

Any suggestions on how to set this up?关于如何设置的任何建议?

I have yet to investigate the actual reason, but after I had installed the "OpenJDK 64-Bit Server VM Zulu (build 11.0.11+9-LT)" and I had started to contemplate overriding eclipse.ini in order to avoid macOS preventing me from starting a modified app (recurrent issue. Note I didn't attempt overriding) I started Eclipse from the command line with the open command and Eclipse starts right up using我还没有调查实际原因,但是在我安装了“OpenJDK 64-Bit Server VM Zulu (build 11.0.11+9-LT)”之后,我开始考虑 覆盖 eclipse.ini以避免 macOS 阻止我从启动一个修改过的应用程序开始(反复出现的问题。注意我没有尝试覆盖)我从命令行使用 open 命令启动了 Eclipse 并且 Eclipse 立即使用

-vm 
/Users/[user name]/.sdkman/candidates/java/11.0.11-zulu/zulu-11.jdk/Contents/Home/bin/`

At least this starts Eclipse.至少这会启动 Eclipse。 Double clicking the app renders the same results as before.双击应用程序呈现与以前相同的结果。

A theory is that since the open command runs in the terminal and java --version verifies the zulu jdk set there by sdkman, this is why.一种理论是,由于 open 命令在终端中运行并且 java --version 验证 sdkman 在那里设置的 zulu jdk,这就是原因。 However JAVA_HOME is empty and the /usr/libexec/java_home -V command only lists the Oracle JDK.但是 JAVA_HOME 为空,/usr/libexec/java_home -V 命令仅列出 Oracle JDK。

Thank you @greg-449 and @howlger.谢谢@greg-449 和@howlger。 I don't think I'd found this without your helpful suggestions.如果没有您的有用建议,我想我不会找到这个。

To not have to be in the terminal just for starting Eclipse I made this little Applescript that opens Terminal (Just executing the command without it involved wouldn't supply the proper JVM):为了不必为了启动Eclipse而在终端中,我制作了这个打开终端的小Applescript(仅在没有涉及的情况下执行命令不会提供正确的JVM):

on run {input, parameters}

tell application "Terminal"
    activate
    do script "open /Applications/Eclipse.app"
    delay 1
    close front window
end tell

Save that as an app and start with this instead of Eclipse.将其另存为一个应用程序,然后从这个而不是 Eclipse 开始。

If I could find out how the proper JVM in Terminal is supplied to Eclipse with the open command, maybe this can be used for modifying how Eclipse starts.如果我能找出终端中正确的 JVM 是如何使用 open 命令提供给 Eclipse 的,也许这可以用于修改 Eclipse 的启动方式。

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

相关问题 不满意的linkerror aarch64三星银河S6 - Unsatisfied linkerror aarch64 Samsung Galaxy S6 在 M1 Mac 上使用 Spring Boot 运行深入的 Vaadin Flow 教程(ARM AArch64 与 Intel x86 芯片) - Run the in-depth Vaadin Flow tutorial using Spring Boot on an M1 Mac (ARM AArch64 versus Intel x86 chip) 是否可以在 AArch64 计算机中编写执行 FMOV 指令的 Java 程序? - Is it possible to write a Java program which executes the FMOV instruction in an AArch64 computer? Netbeans 探查器 OpenJDK 64 位服务器 VM (Zulu 8.58.0.13-CA-macos-aarch64) - Netbeans profiler OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64) 使用ARM64 musl-libs编译OpenJDK 9及更高版本 - Compile OpenJDK 9 and up with ARM64 musl-libs 在aarch64 Odroid C2上的Java 1.8.0_73上运行WebStorm-143.382.36在libjnidispatch.so上失败 - Running WebStorm-143.382.36 on Java 1.8.0_73 on aarch64 Odroid C2 fails on libjnidispatch.so 如何在 Mac M1 上解决此问题 原因:java.lang.Exception:找不到 os.name=Mac 和 os.arch=aarch64 的本机库 - How can I solve this issue on Mac M1 Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64 OpenJDK的和可可在ARM:未知陷阱指令 - OpenJDK and Cacao on ARM: Unknown trap instruction OpenJDK ARM上的HTTP SSL请求问题 - HTTP SSL request issue on OpenJDK ARM 在 Eclipse 中将 OpenJFX 添加到 OpenJDK - Add OpenJFX to OpenJDK inside Eclipse
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM