PDA

View Full Version : uninstall apple's java version?




MacMan988
Oct 6, 2012, 11:40 PM
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.



GGJstudios
Oct 8, 2012, 03:15 PM
How do I completely remove java from my computer?
Why would you want to? Java is useful and important for some apps and websites to function properly.

blatopilot
Oct 8, 2012, 06:41 PM
I think this is what you are asking:

http://reviews.cnet.com/8301-13727_7-57423014-263/how-to-install-and-uninstall-java-7-for-os-x/

MacMan988
Oct 9, 2012, 11:07 AM
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
Oct 9, 2012, 11:10 AM
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 (http://guides.macrumors.com/Mac_Virus/Malware_FAQ)

Weaselboy
Oct 9, 2012, 01:18 PM
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 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and download and install first the JRE (Java Runtime) and then the JDK (Java Development Kit). (see screenshot)

http://i.imgur.com/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 (http://javatester.org/version.html) 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.

https://i.minus.com/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
Oct 9, 2012, 01:38 PM
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 (http://guides.macrumors.com/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. (http://arstechnica.com/apple/2012/04/oracle-updates-java-to-se-7-for-os-x-brings-full-jdk-support/)

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
Oct 9, 2012, 02:13 PM
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 (http://guides.macrumors.com/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 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and download and install first the JRE (Java Runtime) and then the JDK (Java Development Kit). (see screenshot)

http://i.imgur.com/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 (http://javatester.org/version.html) 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.

https://i.minus.com/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
Oct 9, 2012, 02:28 PM
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
Oct 9, 2012, 03:17 PM
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 (http://reviews.cnet.com/8301-13727_7-57408841-263/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 (http://www.bluevariant.com/2012/04/uninstall-java-from-mac-os-x-10-7-lion/)
Serge Stikine: How to uninstall (remove) JAVA from OS X Lion (https://stikine.wordpress.com/2012/03/02/howto-remove-java/)

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 (http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html#uninstall) (scroll to bottom). There is a similar one for the JRE: Uninstalling the JRE (http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jre.html#uninstall) (scroll to bottom).

Graig
Oct 9, 2012, 07:24 PM
Correct me if I am wrong, but does'nt the java 7 JDK also contain and install the JRE?

Weaselboy
Oct 9, 2012, 07:35 PM
Correct me if I am wrong, but does'nt the java 7 JDK also contain and install the JRE?

They are separate.

Graig
Oct 10, 2012, 12:01 AM
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.

xgman
Oct 10, 2012, 10:03 AM
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.

Michaelgtrusa
Oct 10, 2012, 10:34 AM
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.

What apps are they?

Weaselboy
Oct 10, 2012, 12:32 PM
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 (http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US) 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
Oct 10, 2012, 05:40 PM
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.

Weaselboy
Oct 10, 2012, 05:48 PM
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
Oct 10, 2012, 07:07 PM
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.

MisterMe
Oct 10, 2012, 07:24 PM
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
Oct 10, 2012, 09:35 PM
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.

MisterMe
Oct 10, 2012, 11:42 PM
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
Oct 11, 2012, 07:09 AM
Oh, for Heaven's sakes:

Download the Java installer.
Run the Java installer.
There is no Step 3.

xgman
Oct 11, 2012, 08:56 AM
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 (http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US) 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
Oct 11, 2012, 10:33 AM
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.

Graig
Oct 11, 2012, 11:34 AM
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.

Look for an update to Java on October 16th. Then maybe we'll all know the answer.

MacMan988
Oct 16, 2012, 10:36 PM
This thread came to my mind as soon as i saw today's Apple software update for OS X.

Apple seems to have taken action to resolve the confusion towards the java versions availability for the mac os x from both Apple and Oracle.

shareef777
Oct 17, 2012, 02:31 PM
This thread came to my mind as soon as i saw today's Apple software update for OS X.

Apple seems to have taken action to resolve the confusion towards the java versions availability for the mac os x from both Apple and Oracle.

Not really. I had both 1.6 and the newer 1.7 and would switch to 1.6 for those apps that would not work on the newer version. Now with the java preference pane gone, I have no way of switching back to 1.6 and some of my apps can't load now.

dyn
Oct 17, 2012, 02:59 PM
This thread came to my mind as soon as i saw today's Apple software update for OS X.

Apple seems to have taken action to resolve the confusion towards the java versions availability for the mac os x from both Apple and Oracle.
It only installs the Java 1.6 build 37 on the machine, which is the latest in the 1.6 series. Oracle serves Java 1.7 for Windows, Linux, OS X, etc. The same as it was when Oracle first started to serve Java 1.7 for OS X. The only thing that is being done now is to push OS X users towards the Oracle one by removing Java 1.6 web plugin (the plugin used by the web browsers). This creates even more confusion.

The full text from this particular update:

This release updates the Apple-provided system Java SE 6 to version 1.6.0_37 and is for OS X versions 10.7 or later.

This update uninstalls the Apple-provided Java applet plug-in from all web browsers. To use applets on a web page, click on the region labeled "Missing plug-in" to go download the latest version of the Java applet plug-in from Oracle.

This update also removes the Java Preferences application, which is no longer required to configure applet settings.

Weaselboy
Oct 17, 2012, 03:05 PM
Not really. I had both 1.6 and the newer 1.7 and would switch to 1.6 for those apps that would not work on the newer version. Now with the java preference pane gone, I have no way of switching back to 1.6 and some of my apps can't load now.

/Library/Java/JavaVirtualMachines

Go to this folder and remove 1.7. This will leave you Java 6 (1.6) for the runtime for apps, and it will leave 7 (1.7) in place as the web plugin.

I had the same experience as you with this breaking the Crashplan OS X app and this fixed it by allowing the app to use 1.6 again.

shareef777
Oct 17, 2012, 03:11 PM
/Library/Java/JavaVirtualMachines

Go to this folder and remove 1.7. This will leave you Java 6 (1.6) for the runtime for apps, and it will leave 7 (1.7) in place as the web plugin.

I had the same experience as you with this breaking the Crashplan OS X app and this fixed it by allowing the app to use 1.6 again.

Thanks, but /Library/Java/JavaVirtualMachines folder is empty. Though I can successfully launch java applets from a web browser and/or a desktop shortcut (goes straight to the 1.7 version).

Weaselboy
Oct 17, 2012, 03:20 PM
Thanks, but /Library/Java/JavaVirtualMachines folder is empty. Though I can successfully launch java applets from a web browser and/or a desktop shortcut (goes straight to the 1.7 version).

What do you get with the command "java -version" (without quotes) in Terminal? I had two 1.7 entries in that folder and by deleting them the java -version command showed my runtime (not the web plugin) back at 1.6.

shareef777
Oct 17, 2012, 03:30 PM
What do you get with the command "java -version" (without quotes) in Terminal? I had two 1.7 entries in that folder and by deleting them the java -version command showed my runtime (not the web plugin) back at 1.6.

And that's what's getting me. I've installed the latest version (1.7) multiple times, but it continues to show this:

java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

Though the Java's site shows i'm on 1.7 and all applets I launch are erroring out because i'm running 1.7.

dyn
Oct 17, 2012, 03:40 PM
Read the readme's that Oracle puts on their website :)

If you want the commandline stuff (java -version) you need to install the JDK. Previously you could dictate whether to use version 6 or 7 by rearranging them in Java Preferences. This is now impossible because Java Preferences will be removed with this update. You can have multiple JDK versions on your system which is why you had this option.

If you only run Java applications/applets you only need the JRE which is the web plugin that this update also removes. This plugin will install a System Preferences panel under the "Other" category. You can use this to launch the JRE preferences. This is enough because you can only have 1 JRE version on your system. It seems that Apple is going this route and thus Java Preferences is obsolete. If you require more Java versions to run along side then Oracle has to come up with something to do so.

shareef777
Oct 17, 2012, 03:44 PM
Read the readme's that Oracle puts on their website :)

If you want the commandline stuff (java -version) you need to install the JDK. Previously you could dictate whether to use version 6 or 7 by rearranging them in Java Preferences. This is now impossible because Java Preferences will be removed with this update. You can have multiple JDK versions on your system which is why you had this option.

If you only run Java applications/applets you only need the JRE which is the web plugin that this update also removes. This plugin will install a System Preferences panel under the "Other" category. You can use this to launch the JRE preferences. This is enough because you can only have 1 JRE version on your system. It seems that Apple is going this route and thus Java Preferences is obsolete. If you require more Java versions to run along side then Oracle has to come up with something to do so.

Until Oracle does so, Apple should not push this update thru without a way to revert it. Now I'm stuck on JRE 1.7 when I have no method of pushing 1.6. Which I'm curious as to why Apple bothered to update 1.6 when you can't run it anyway.

dyn
Oct 17, 2012, 04:29 PM
I searched a bit more and there seems to be something on the commandline to use the various JDKs on the machine:


To run a different version of Java, either specify the full path, or use the java_home tool:

/usr/libexec/java_home -v 1.7.0_06 --exec javac -version

For more information, see the java_home(1) man page.

Source: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html#version

If you do a "man java_home" in Terminal/iTerm2/etc. it gives you the manual. It doesn't mention anything about permanently setting a specific JDK version as the default though.

Michaelgtrusa
Oct 17, 2012, 06:37 PM
Who has run this update? http://www.macupdate.com/app/mac/39490/apple-java

turtlez
Jan 26, 2013, 03:06 AM
I had to install Java and it makes me feel more sick than when I installed Flash. My mac doesn't feel the same with those two installed.

viper1165
Feb 1, 2013, 08:03 AM
I have Java disabled from my iMac, but for the past 2 months or so I have been getting annoying pop ups from saying I need to "download Java SE 6". Does anyone know how to get rid of this?