22

Currently running OSX El Capitan on a recently set up computer. 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.

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. After trying to reinstall JDK 1.8, still no luck and I'm out of ideas.

2 Answers 2

66

This is not the Library folder in your home directory, this is the Library folder in the root file system on your main disk.

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.

To list what is in the directory use:

ls /Library/Java/JavaVirtualMachines
Sign up to request clarification or add additional context in comments.

2 Comments

I got cd: no such file or directory: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk Please help me to find Java Home.
@Harsha You have to replace jdk1.8.0_91.jdk with whatever your actual Java release is. Use ls /Library/Java/JavaVirtualMachines to list which jdks are installed
3

Go to Macintosh HD/Library/Java not to username/Library

2 Comments

This was already explained in the first sentence of the accepted answer.
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.