即使JRE 8安装在我的MAC OS Yosemite 10.10.3,而运行Android目前的工具在sdk -错误-“没有Java运行时目前,请求安装”会显示在终端-我如何解决这个问题?

我想安装Xamarin测试记录器-安装后 让我安装Android sdk SDK下载路径:Library/Developer/Xamarin/android-sdk 现在当我在工具文件夹中运行Android时,我得到了错误 没有Java运行时 我已经安装了JRE 8,并得到了验证 Java版本从他们的网站

有人能帮帮我吗!!


当前回答

It's worth noting that with my current version of SQLDeveloper (21.2.1), there's another way to specify the JDK location. In my case, I was able to open up ~/.sqldeveloper/21.2.1/product.conf and set the JavaHome directive to the appropriate directory. I use jabba for JDK version management, and this path was something like ~/.jabba/jdk/amazon-corretto@1.8.292-10.1/Contents/Home. Needless to say, just setting that config value and restarting SQLDeveloper left me with a running copy again. This should work with any version of SQLDeveloper given the product.conf file exists inside your user's .sqldeveloper directory appropriate for the version you are using.

其他回答

在OS X的新版本(特别是Yosemite, EL Capitan)中,苹果出于安全原因已经删除了Java支持。 要解决这个问题,您必须执行以下操作。

从此链接下载Java for OS X 2015-001: https://support.apple.com/kb/dl1572?locale=en_US 挂载磁盘镜像文件,安装适用于OS X的Java 6运行时。 在此之后,您应该不会看到以下任何消息: -无法找到任何匹配版本的jvm "(null)" -没有Java运行时,尝试——request安装。 这将解决如下所示的弹出窗口的问题:

我不需要完整的JDK,我只需要让JRE工作,上面提供的其他答案都不适合我。 也许它曾经起作用,但现在(2018年7月1日)不起作用了。我一直得到错误和弹出窗口。

我最终通过在~/.bash_profile中放置以下JAVA_HOME导出来解决这个问题:

export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

希望这能帮助到一些人。 我运行的是Mac OS High Sierra。

我只需要在Mac上执行以下操作:

brew install openjdk
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home"
java --version

It's worth noting that with my current version of SQLDeveloper (21.2.1), there's another way to specify the JDK location. In my case, I was able to open up ~/.sqldeveloper/21.2.1/product.conf and set the JavaHome directive to the appropriate directory. I use jabba for JDK version management, and this path was something like ~/.jabba/jdk/amazon-corretto@1.8.292-10.1/Contents/Home. Needless to say, just setting that config value and restarting SQLDeveloper left me with a running copy again. This should work with any version of SQLDeveloper given the product.conf file exists inside your user's .sqldeveloper directory appropriate for the version you are using.

2021的解决方案

博士TL;

brew install temurin

细节

在M1 Mac/Apple Silicon(运行Big Sur)上,我已经安装了openjdk。正如Mohammed在之前的回答中指出的那样,openjdk只包含brew,因此需要添加符号链接。

在此之后,它解决了No Java Runtime present错误,但rJava抱怨缺少libjvm。Dylib和现有的库是错误的架构:

.onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(jvm, FALSE)
  error: unable to load shared object '/opt/homebrew/Cellar/openjdk/16.0.2/libexec/openjdk.jdk/Contents/Home/lib/server/libjvm.dylib':
  dlopen(/opt/homebrew/Cellar/openjdk/16.0.2/libexec/openjdk.jdk/Contents/Home/lib/server/libjvm.dylib, 10): 
    no suitable image found.  Did find:
    /opt/homebrew/Cellar/openjdk/16.0.2/libexec/openjdk.jdk/Contents/Home/lib/server/libjvm.dylib: 
    mach-o, but wrong architecture

安装Eclipse Temurin(以前是AdoptOpenJDK)(并删除之前在/Library/Java/JavaVirtualMachines/openjdk.jdk中创建的符号链接)立即无缝地解决了这两个问题。

只要运行brew安装temurin,一切都应该没问题。