在Mac上设置IntelliJ的JDK 7。

时间:2021-05-19 23:35:09

I installed the JDK by downloading the dmg from the Oracle website here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html

我通过从Oracle网站下载dmg安装了JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html。

After installation I tried to setup the JDK in IntelliJ but when I set the location to the JDK in the Project Structure->SDKs screen, only a few libraries were loaded and many (including all libraries from Content/Classes/) were missing.

安装之后,我尝试在IntelliJ中设置JDK,但是当我将这个位置设置到项目结构中的JDK时——>SDKs屏幕,只有几个库被加载,很多(包括来自内容/类/的所有库)都不见了。

How can I add all of the necessary libraries?

如何添加所有必要的库?

The install location for the JDK is /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home

JDK的安装位置是/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home。

I've tried looking in /System/Library/Frameworks/JavaVM.framework/Versions/ to no avail.

我尝试过查找/系统/库/框架/JavaVM.framework/版本/都没有用。

3 个解决方案

#1


31  

You need to ensure that all the jars from /Library/Java/JavaVirtualMachines/jdkXYZ_VERSION.jdk/Contents/Home/jre/lib directory too (charsets.jar, jce.jar, JObjC.jar, jsse.jar, management-agent.jar, resources.jar and rt.jar) are part of your setup.

您需要确保所有的jar来自/库/Java/JavaVirtualMachines/jdkXYZ_VERSION。jdk /内容/ Home / jre / lib目录(数据集。jar,jce。JObjC jar。jar,jsse。jar,管理代理。jar,资源。jar和rt.jar)是您的设置的一部分。

在Mac上设置IntelliJ的JDK 7。

Under Project Structure -> Platform Settings/SDKs.

项目结构->平台设置/ sdk。

By using '+' sign, you should add a valid JDK, that will take care and add the proper libraries, eg. /Library/Java/JavaVirtualMachines/jdkXYZ.jdk/Contents/Home

通过使用“+”符号,您应该添加一个有效的JDK,这将照顾并添加适当的库(如)。/图书馆/ Java / Home / JavaVirtualMachines / jdkXYZ.jdk /内容

#2


66  

Navigate to Project Structure -> Platform Settings/SDKs.

导航到项目结构->平台设置/ sdk。

Hit the '+' sign and add /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

点击“+”符号,添加/库/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home。

#3


3  

For me, I had to select Project Structure->Platform Setting->Global Libraries and click on the "+" icon that is at the top of the middle pane of the Project Structure window. This brings up a "New Global Library" drop down menu. From there I was able to locate the libraries I wanted to include.

对我来说,我必须选择项目结构->平台设置->全局库,点击项目结构窗口中间窗格顶部的“+”图标。这就带来了一个“新的全球图书馆”下拉菜单。从那里我可以找到我想要包括的图书馆。

#1


31  

You need to ensure that all the jars from /Library/Java/JavaVirtualMachines/jdkXYZ_VERSION.jdk/Contents/Home/jre/lib directory too (charsets.jar, jce.jar, JObjC.jar, jsse.jar, management-agent.jar, resources.jar and rt.jar) are part of your setup.

您需要确保所有的jar来自/库/Java/JavaVirtualMachines/jdkXYZ_VERSION。jdk /内容/ Home / jre / lib目录(数据集。jar,jce。JObjC jar。jar,jsse。jar,管理代理。jar,资源。jar和rt.jar)是您的设置的一部分。

在Mac上设置IntelliJ的JDK 7。

Under Project Structure -> Platform Settings/SDKs.

项目结构->平台设置/ sdk。

By using '+' sign, you should add a valid JDK, that will take care and add the proper libraries, eg. /Library/Java/JavaVirtualMachines/jdkXYZ.jdk/Contents/Home

通过使用“+”符号,您应该添加一个有效的JDK,这将照顾并添加适当的库(如)。/图书馆/ Java / Home / JavaVirtualMachines / jdkXYZ.jdk /内容

#2


66  

Navigate to Project Structure -> Platform Settings/SDKs.

导航到项目结构->平台设置/ sdk。

Hit the '+' sign and add /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

点击“+”符号,添加/库/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home。

#3


3  

For me, I had to select Project Structure->Platform Setting->Global Libraries and click on the "+" icon that is at the top of the middle pane of the Project Structure window. This brings up a "New Global Library" drop down menu. From there I was able to locate the libraries I wanted to include.

对我来说,我必须选择项目结构->平台设置->全局库,点击项目结构窗口中间窗格顶部的“+”图标。这就带来了一个“新的全球图书馆”下拉菜单。从那里我可以找到我想要包括的图书馆。