简体   繁体   English

尽管安装了 JDK,但库中没有 Java 文件夹

[英]No Java folder located in Library despite JDK installation

Currently running OSX El Capitan on a recently set up computer.当前在最近设置的计算机上运行 OSX El Capitan。 I'm trying to set up Java's unlimited crypto policy which requires me to modify some files within my current jre, but I can't find the Java folder that is supposed to be located within Library.我正在尝试设置 Java 的无限制加密策略,这要求我修改当前 jre 中的一些文件,但我找不到应该位于 Library 中的 Java 文件夹。

I've run /usr/libexec/java_home which shows me /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home however within my Library folder, there is no Java folder, even when I try and navigate through terminal it says Java folder doesn't exist.我已经运行/usr/libexec/java_home显示我/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home但是在我的 Library 文件夹中,没有 Java 文件夹,即使我尝试通过终端导航它说Java文件夹不存在。 After trying to reinstall JDK 1.8, still no luck and I'm out of ideas.尝试重新安装 JDK 1.8 后,仍然没有运气,我没有想法。

This is not the Library folder in your home directory, this is the Library folder in the root file system on your main disk.这不是Library在你的主目录文件夹,这是Library在你的主盘上的根文件系统文件夹。

So in Terminal the command所以在终端命令

cd /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk

should work.应该工作。

For different releases of Java replace jdk1.8.0_91.jdk with the appropriate release.对于不同的 Java 版本,将jdk1.8.0_91.jdk替换为相应的版本。

To list what is in the directory use:要列出目录中的内容,请使用:

ls /Library/Java/JavaVirtualMachines

转到 Macintosh HD/Library/Java 而不是用户名/Library

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

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