简体   繁体   中英

Where is java installed on my mac?

I am having trouble finding where java is installed on my mac. I am trying to downgrade from java 1.8 to java 1.7.

When I run the command /usr/libexec/java_home it returns /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home but the trouble is when I go to the Library folder there is no Java folder. I've tried navigating there in terminal and it says -bash: cd: Java: No such file or directory

How can I get the Java folder to show? I was thinking maybe it is hidden. Or what other commands can I use that will point me to where Java is installed?

Try:

which java

This should give you the path of the java binary. It might be a link to another file, which you'll be able to check with:

ls -l `which java`

In your case Java doesn't seem to have been removed completely.

Go to /Library/PreferencePanes/JavaControlPanel.prefPane and remove it from command line. You might need sudo access.

Also remove the JavaAppletPlugin from /Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin Again sudo access is necessary

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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