Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
839
121
Hi, I want to completely remove the java software that that apple gives us. Yesterday I installed this by clicking on the java preferences application that comes with Mountain Lion and accepting the dialog box saying that Java needs to be installed.

How do I completely remove java from my computer?

Thanks in advance.
 

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
839
121
Why would you want to? Java is useful and important for some apps and websites to function properly.

I want to remove what java preferences has installed when I opened java preferences for the first time.

I rarely get to use any websites that uses java applets. And the other reason is, that I have seen that the java version installed by the java preferences is an old version. Oracle provides a newer version and recommend to update. I have heard that its always good to have an up dated version of java installed to avoid security related issues, isnt it?
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
I have heard that its always good to have an up dated version of java installed to avoid security related issues, isnt it?
All you need to do for security is keep Apple's Java version updated through Software Update and disable Java in your browser until you visit a trusted site that requires it. Then enable it only for the duration of your visit. More details about protecting your Mac are in the following link.

Mac Virus/Malware FAQ
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,694
California
I want to remove what java preferences has installed when I opened java preferences for the first time.

I rarely get to use any websites that uses java applets. And the other reason is, that I have seen that the java version installed by the java preferences is an old version. Oracle provides a newer version and recommend to update. I have heard that its always good to have an up dated version of java installed to avoid security related issues, isnt it?

Apple has surely muddied the waters with all this.

Go to Oracle's web site here and download and install first the JRE (Java Runtime) and then the JDK (Java Development Kit). (see screenshot)

EYPBB.png


This will get you Java 7 and will overwrite the Java 6 web plugin that Apple installed. You can verify this by going to this site where it will display the Java plugin version you are running. If you are not using any sites now that need the Java plugin you can just uncheck Enable Java in the security tab of Safari preferences. Or you can just leave it checked and the plugin will disable itself if you have not used it lately.

Next start the Java Preferences app from /Applications/Utilities and drag Java 7 to the top of the list like in my screenshot. This will make locally run Java applications use Java 7 instead of Java 6. You can uncheck the Java 6 options if you do not want them to be allowed to run. This section is for the Java runtime for local applications, and has nothing to do with the web plugin.

icf9wiq4aNZ7c.png


The Java web plugin is the source of the security issues, and by installing Java 7 you have overwritten the Apple supplied Java 6 plugin. Hopefully Oracle does a better job keeping Java 7 up to date.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,694
California
All you need to do for security is keep Apple's Java version updated through Software Update and disable Java in your browser until you visit a trusted site that requires it. Then enable it only for the duration of your visit. More details about protecting your Mac are in the following link.

Mac Virus/Malware FAQ

OP is inquiring about using Java 7 from Oracle to get more timely updates, and he is absolutely correct. Apple has already said they are going to drop support for Java. The updates will be coming directly from Oracle and more quickly than they did from Apple. Read.

Simply telling him to turn off Java in the browser does nothing to get him the latest version directly and automatically from Oracle for the occasions he does need Java.
 

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
839
121
All you need to do for security is keep Apple's Java version updated through Software Update and disable Java in your browser until you visit a trusted site that requires it. Then enable it only for the duration of your visit. More details about protecting your Mac are in the following link.

Mac Virus/Malware FAQ

Thank you for the information and the link you have given.

Apple has surely muddied the waters with all this.

Go to Oracle's web site here and download and install first the JRE (Java Runtime) and then the JDK (Java Development Kit). (see screenshot)

EYPBB.png


This will get you Java 7 and will overwrite the Java 6 web plugin that Apple installed. You can verify this by going to this site where it will display the Java plugin version you are running. If you are not using any sites now that need the Java plugin you can just uncheck Enable Java in the security tab of Safari preferences. Or you can just leave it checked and the plugin will disable itself if you have not used it lately.

Next start the Java Preferences app from /Applications/Utilities and drag Java 7 to the top of the list like in my screenshot. This will make locally run Java applications use Java 7 instead of Java 6. You can uncheck the Java 6 options if you do not want them to be allowed to run. This section is for the Java runtime for local applications, and has nothing to do with the web plugin.

icf9wiq4aNZ7c.png


The Java web plugin is the source of the security issues, and by installing Java 7 you have overwritten the Apple supplied Java 6 plugin. Hopefully Oracle does a better job keeping Java 7 up to date.

Thank you Weaselboy for giving me a good solution for my problem. I was worried about keeping an out dated version of java running. But if as you mentioned the version 7 would overwrite the version 6 web plugin, then the problem is solved.
 

golf1410

macrumors 6502a
May 7, 2012
748
3
San Francisco, CA
There is no way to completely uninstall java. The best way is to install fresh OS. Or use Time machine to go back before Java is installed.
 

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
That is complete and utter BS. Java is easy to uninstall by removing certain folders from the commandline (Terminal). There are several sites with a howto:
CNET: How to check for and disable Java in OS X
Bluevariant: Uninstall Java from Mac OS X 10.7 (Lion) to Protect Yourself from Future Exploits
Serge Stikine: How to uninstall (remove) JAVA from OS X Lion

The various java commands that one can find in /sbin are only aliases to the ones installed by the JDK (which is either installed by OS X when you start any Java thing or which is installed by the user if they choose to go with the one from Oracle). One should not mess with these and there is also no need to because these won't do anything. If there is no JDK or JRE there is no Java on the system and these aliases won't work. It is that easy :)

Java 7, which is provided by Oracle, is much easier to uninstall. Oracle provides instructions how to do this: Uninstalling the JDK (scroll to bottom). There is a similar one for the JRE: Uninstalling the JRE (scroll to bottom).
 

Graig

macrumors 6502
Aug 23, 2009
329
5
Vancouver, BC
They are separate.

The reason I questioned this is because Oracles instruction for installing the JDK says that it includes the JRE.

JDK 7 Installation for Mac OS X
See JDK 7 and JRE 7 Installation Guide for general information about installing JDK 7 and JRE 7.

See the Mac OS X Platform Install FAQ for general information about installing JDK 7 on Mac OS X.

Contents
System Requirements
JDK 7 Installation Instructions
Determining The Default Version of the JDK
Uninstalling the JDK
System Requirements
Any Intel-based Mac running Mac OS X 10.7.3 (Lion) or later.
Administrator privileges.
Note that installing the JDK on a Mac is performed on a system wide basis, for all users, and administrator privileges are required. You cannot install Java for a single user.

Installing the JDK also installs the JRE. The one exception is that the system will not replace the current JRE with a lower version. To install a lower version of the JRE, first uninstall the current version.

JDK 7 Installation Instructions
Installation of the 64-bit JDK on Mac Platforms
When you download the Java Development Kit (JDK), the associated Java Runtime Environment (JRE) is installed at the same time. The JavaFX SDK and Runtime are also installed and integrated into the standard JDK directory structure.
 
Last edited:

xgman

macrumors 603
Aug 6, 2007
5,675
1,388
I mistakenly uninstalled java 6 and installed java 7 and there are a few apps that won't work any longer that are looking for java 6 and I can't seem to get to a stage where I can get it back.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,694
California
I mistakenly uninstalled java 6 and installed java 7 and there are a few apps that won't work any longer that are looking for java 6 and I can't seem to get to a stage where I can get it back.

You can DL Java 6 here from Apple. You can run Java 6 and 7 at the same time. Just drag 7 to the top of the prefs like in my post above. OS X will try to use 7 on any app, and fall back to 6 if the app only runs on 6.

You might want to install 7 again after this, as I am not sure if reinstalling 6 will over write the Java 7 web plugin?

----------

The reason I questioned this is because Oracles instruction for installing the JDK says that it includes the JRE.

Interesting :confused: I had not seen that. You are correct.
 

Graig

macrumors 6502
Aug 23, 2009
329
5
Vancouver, BC
So when the time comes to install a newer JDK must one uninstall the older version first. I looked at the Oracle's instructions for uninstalling it and am afraid it left me rather mystified.
 
Last edited:

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,694
California
So when the time comes to install a newer SDK must one uninstall the older version first. I looked at the Oracle's instructions for uninstalling it and am afraid it left me rather mystified.

I never installed the Java 6 JDK, so can't tell. If I look in /Library/Java/JavaVirtualMachines all I see it the Java 7 JDK.
 

Graig

macrumors 6502
Aug 23, 2009
329
5
Vancouver, BC
I think I'll wait until the next JDK Update comes out and then see if anyone will be able to figure out what to do. You can install as many JDK's as you like but who wants a bunch of them installed, one would be all you would need I think.
 
Last edited:

MisterMe

macrumors G4
Jul 17, 2002
10,709
69
USA
So when the time comes to install a newer SDK must one uninstall the older version first. I looked at the Oracle's instructions for uninstalling it and am afraid it left me rather mystified.
We cannot predict the future, but this is not how Mac software works. Standard practice is for the installer to handle version issues. However, most Mac software titles allow different versions to work side-by-side. This has certainly been the case with Java. Each new version has been added to the previous versions. The required JVM was selected on a demand basis.

The takeaway message is that you are making this way too hard. A lot of Mac software is Java-based. This is particularly true of torrent clients. My firm's mission-critical software is based on an Oracle database that is accessed via a Java-based application.

I have never ever had a problem using my Mac to access any Java-based application. Of the reported problems on this forum, the solution is to use Java Preferences to change the order of precedence for the various versions of the Java Virtual Machines.
 

Graig

macrumors 6502
Aug 23, 2009
329
5
Vancouver, BC
I understand the concept of Java preferences, I was simply trying to understand how to update to a new SDK version without having to install multiple versions each time one is released. Maybe the answer is to simply install the JRE but that is not the ideal. Specifically I would like to know how to upgrade Java SDK 7 update 6 to Java SDK 7 update 7.
 
Last edited:

MisterMe

macrumors G4
Jul 17, 2002
10,709
69
USA
Why are you trying so hard to make the process so hard? In my last post, I said that the installer will take care of these issues. Let the installer take care of these issues. You do not need to worry about multiple versions.
 

MisterMe

macrumors G4
Jul 17, 2002
10,709
69
USA
Oh, for Heaven's sakes:
  1. Download the Java installer.
  2. Run the Java installer.
  3. There is no Step 3.
 

xgman

macrumors 603
Aug 6, 2007
5,675
1,388
What apps are they?

I don't remember. I was too disgusted at the apps for needing java in the first place.

----------

You can DL Java 6 here from Apple. You can run Java 6 and 7 at the same time. Just drag 7 to the top of the prefs like in my post above. OS X will try to use 7 on any app, and fall back to 6 if the app only runs on 6.



----------

[/COLOR]

Trouble is that I stripped out the Apple OS parts that the instructions said not to, including some hidden parts and they will not go back in with a normal install. Basically I fubar'ed my java install as far as Apple OS is concerned. I would need step by step file removal and replacement instructions to make it right. I tried what you said and it wouldn't work.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,171
15,694
California
Trouble is that I stripped out the Apple OS parts that the instructions said not to, including some hidden parts and they will not go back in with a normal install. Basically I fubar'ed my java install as far as Apple OS is concerned. I would need step by step file removal and replacement instructions to make it right. I tried what you said and it wouldn't work.

Can you just reinstall the OS to right things then after that reinstall the Java version you want? That should work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.