Posts

Showing posts with the label java home not correct

How to solve the java home showing as /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home in MacOS Big Sur?

If we install the Java in MacOs Big Sur after downloading the JDK from Oracle, i am unable to compile the java program using javac.   Install JDK 8:  https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html          Java SE Development Kit 8u281 When i check the java -version , it is showing as below  java version "1.8.0_311" Java(TM) SE Runtime Environment (build 1.8.0_311-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode) After that when i check the java home using  /usr/libexec/java_home -V  it is the showing it as  /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home Solution: Use the below commands to remove the folder sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin  sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefpane Then use this to check the java home /usr/libexec/java_home -V  jayabalan@Saravanakumars-MacBook-Air ~ % /usr/libexec/java_ho...