简体   繁体   English

在OS X上安装Java 7 JDK之后,JavaVirtualMachines仍然显示“ 1.6.0.jdk”

[英]JavaVirtualMachines still says “1.6.0.jdk” after installing Java 7 JDK on OS X

I am trying to download the Java 7 jdk for Android Studio on my mac because "Android-21 requires compiling with JDK 7" 我试图在Mac上下载适用于Android Studio的Java 7 jdk,因为“ Android-21要求使用JDK 7进行编译”

I have downloaded and installed the Java 7 jdk numerous times and restarted my laptop, but when I go to check the jdk in /System/Library/Java/JavaVirtualMachines it says 1.6.0.jdk 我已经下载并安装了Java 7 jdk多次,然后重新启动了笔记本电脑,但是当我去/ System / Library / Java / JavaVirtualMachines中检查jdk时,它显示为1.6.0.jdk。

Correct me if I'm wrong, but 1.6.0 is the Java 6 jdk, right? 如果我错了,请纠正我,但是Java 6 jdk是1.6.0,对吗?

and is there a way to install it manually? 可以手动安装吗?

It is not in /System/Library/Java/JavaVirtualMachines 它不在/ System / Library / Java / JavaVirtualMachines中

But in Library/Java/JavaVirtualMachines 但是在Library / Java / JavaVirtualMachines中

If you take the folder structure at your root There will be two folders 1. System 2. Library 如果您在根目录采用文件夹结构,将有两个文件夹1.系统2.库

I am talking about the 2nd one. 我说的是第二个。 Not the Library folder in Systems folder 不是Systems文件夹中的Library文件夹

Use this command on terminal to find your JDK location 在终端上使用此命令查找您的JDK位置

/usr/libexec/java_home 

我的Mac上装有Java 7,但它位于/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home中。

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

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