OS X Lion ships without Java now. Installing it is not very difficult - however, our product relies on Java so we need to test the scenario of not having Java installed.
Once I've installed Java, is there any way to uninstall it from Lion?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
I followed the instructions followed in this blog and they worked for me.
The steps are as follows:
sudo /usr/libexec/java_home -xml(an output with two JVM dictionaries confirms that Java is installed)
sudo /usr/libexec/java_home –uninstall
sudo rm -rf /System/Library/Java
A procedure for uninstalling Java in Leopard is outlined in
How do you uninstall and then reinstall java on Mac OS X? :
There is no Java uninstaller that I am aware of.
Use Spotlight to find Java files, including receipts. You will have to be an expert surgeon because quite a lot of what you find may have come from third-party installers. (Do you really want to mess up several different applications?)
Trash the items that you are sure are only related to the Java VM.
Rename or remove:
Boot to the Leopard install DVD. Choose custom install, select only "Essential System Software". After it finishes and restarts, use Software Update for a few update-restart cycles until it shows "is up-to-date".
The -uninstall option does not work anymore, it is not present. To remove java on my Mac I checked ... http://www.java.com/en/download/help/mac_uninstall_java.xml
I could not find Java through the user interface so I suggest to use the command lines option
Note: To uninstall Java 7, you must have Administrator privileges and execute the remove command either as root or by using the sudo.
1 - Click on the Finder icon located in your dock 2 - Click on Applications tab on sidebar 3 - Click on the Utilities folder 4 - Double-click on the Terminal icon 5 - In the Terminal window Copy and Paste the command below: sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin