Return to site

Keep Getting Java Download Error Mac Os X

broken image


This wikiHow will teach you how to check what version of Java you have installed on your Mac by checking the System Preferences, using the Java website, or by using your Mac's Terminal. It's the Apple icon in the upper-left of the. Mac OS X - Apple Java (prior to Java 1.6.037) Until the release of Mac OS X Lion (10.7.x), Java was included with the operating system. Starting with Mac OS X Lion (10.7.x), Apple does not include Java by default and installation has to be done manually. To install, please follow these steps: In Spotlight, type 'Java Preferences' and select it.

  1. Keep Getting Java Download Error Mac Os X 10.7
  2. Update Java Mac Os
  3. Install Java For Mac

Keep Getting Java Download Error Mac Os X 10.7

Due to java issues on mac lots of Mac users want to remove java development kit on mac from their computers. Because its cover lots of space on computer. Currently there are lots of alternatives available for computer which not failed to create the java virtual machine. So now its time to remove java.

Remove Java Run Time

Basically computer users says java for php developers only but that's not true Java can be used for different coding platform such as JavaScript, C++ and lot more. However if you don't know about programming then in this case the best option is to remove Java from your computer to boost your computer speed and space.

Open Terminal on your Mac

Paste these two command lines in terminal that enough to stop Java on your Mac. You may promoted for the administration password.

sudo rm -fr /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefpane

Update Java Mac Os

Removing Java JDK 8 and JDK 7 from Mac

Java Development Kit its bit differ from Java Runtime but its necessary to run Java programs on mac. Which means after removing Java Runtime you've to remove Java JDK from mac. Because may be its complete installed on your computer and occupying large space.

To check its there is Java JDK installed on your computer or not.

Paste the given command line in terminal to change the current folder to check if there was Java Virtual Machine installed or not.

cd /Library/Java/JavaVirtualMachines

Now then enter this command line (Is) at the prompt to see if there is anything or not. If you've found there was Java JDK incomplete installation files then remove them using this command line.

sudo rm -rf jdk1

Install Java For Mac

After enter the above command line press Tab key from keyboard to make a process complete.

After remove both Java Runtime and Java Development Kit from mac you've to may sure the Java is complete gone from your Mac. However you've already notice by opening System Preference the Java icon is gone.

But there is also one other way to conform Java uninstalled from mac. Open up Terminal and type 'Java' you see a message just like that 'No Java runtime present, requesting install' which you've to install Java on Mac.

Tagged with:coding, Computers, How To Java, How To Mac, HowTo, Java, Mac OS X, Programming

Question or issue on macOS:

I've installed JDK 7u7 downloaded from oracle's website. But after installation, the terminal is still showing java version 6

any idea why java 7 is not showing up?

Ans:
OK, the problem has been resolved. Here is the answer:
I found that my Terminal has a .bash_profile and the java home variable is set to 1.6

So this is the line causing the problem every time I opened a new terminal window.
Simply remove this line will solve the problem. You still need to follow what @aleroot said, but if that doesn't work for you, check the .bash_profile (or .bashrc) setting file to see if you've previously exported any java version.

How to solve this problem?

Solution no. 1:

Because you need to enter in Java Preferences pane and flag only the JVM 7 in this way :

To easily and quickly open the Java Preferences pane in Mac OS X you can simply call spotlight with +SPACE and type System Preferences it will show up in the last row of the window.

Keep
How

Solution no. 2:

Oracle's installer puts java inside the /Library/Internet Plug-Ins/JavaAppletPlugin.plugin. And it doesn't overwrite /usr/bin/java. So, if you issue a

in the terminal, it'll return /usr/bin/java. (which in turn points to /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java, which is Apple's 1.6 version).

So, if you want to use the new java version, replace the /usr/bin/java symlink so that it points to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java instead:

Solution no. 3:

Install the JDK 7 and this problem will solve itself.

Be sure to get the Java Development Kit (JDK) which includes compilers and stuff like that, rather than just the Java Runtime Environment (JRE) .

Mac

Solution no. 4:

vi ~/.bash_profile

add

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

This tells your /usr/bin/java link target to use the latest Java 7 Package installed in

/Library/Java/JavaVirtualMachines/

So for JDK 1.7.0_17JAVA_HOME would be:

/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

Note: There were a lot of change in this area recently to move Mac OS X from Appels own System integrated Java packages to Oracle based Java Packages. The above solution is working fine as of Mac OS X 10.8.2

Solution no. 5:

In my case, the issue was that Oracle was installing it to a different location than I was used to.

Download from Oracle: http://java.com/en/download/mac_download.jsp?locale=en

Keep Getting Java Download Error Mac Os X
  1. Verify that it's installed properly by looking in System Prefs:

    • Command-Space to open Spotlight, type ‘System Preferences', hit enter.
    • Click Java icon in bottom row. After the Java Control Panel opens, click ‘Java' tab, ‘View…', and verify that your install worked. You can see a ‘Path' there also, which you can sub into the commands below in case they are different than mine.
  2. Verify that the version is as you expect (sub in your path as needed):

    /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version

  3. Create link from /usr/bin/java to your new install

    sudo ln -fs /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java

  4. Sanity check your version:

    java -version

Solution no. 6:

I had run into a similar issue with terminal not updating the java version to match the version installed on the mac.

Keep Getting Java Download Error Mac Os X

Solution no. 2:

Oracle's installer puts java inside the /Library/Internet Plug-Ins/JavaAppletPlugin.plugin. And it doesn't overwrite /usr/bin/java. So, if you issue a

in the terminal, it'll return /usr/bin/java. (which in turn points to /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java, which is Apple's 1.6 version).

So, if you want to use the new java version, replace the /usr/bin/java symlink so that it points to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java instead:

Solution no. 3:

Install the JDK 7 and this problem will solve itself.

Be sure to get the Java Development Kit (JDK) which includes compilers and stuff like that, rather than just the Java Runtime Environment (JRE) .

Solution no. 4:

vi ~/.bash_profile

add

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

This tells your /usr/bin/java link target to use the latest Java 7 Package installed in

/Library/Java/JavaVirtualMachines/

So for JDK 1.7.0_17JAVA_HOME would be:

/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

Note: There were a lot of change in this area recently to move Mac OS X from Appels own System integrated Java packages to Oracle based Java Packages. The above solution is working fine as of Mac OS X 10.8.2

Solution no. 5:

In my case, the issue was that Oracle was installing it to a different location than I was used to.

Download from Oracle: http://java.com/en/download/mac_download.jsp?locale=en

  1. Verify that it's installed properly by looking in System Prefs:

    • Command-Space to open Spotlight, type ‘System Preferences', hit enter.
    • Click Java icon in bottom row. After the Java Control Panel opens, click ‘Java' tab, ‘View…', and verify that your install worked. You can see a ‘Path' there also, which you can sub into the commands below in case they are different than mine.
  2. Verify that the version is as you expect (sub in your path as needed):

    /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version

  3. Create link from /usr/bin/java to your new install

    sudo ln -fs /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java

  4. Sanity check your version:

    java -version

Solution no. 6:

I had run into a similar issue with terminal not updating the java version to match the version installed on the mac.

There was no issue with the JAVA_HOME environmental variable being set

I have come up with a temporary and somewhat painful but working solution.

In you .bash_profile add the line:

(This is the path on my machine but may be different on yours, make sure to get yours. The paths should match up to /Library/Java/JavaVirtualMachines/)

the run source ~/.bash_profile

As I mentioned this is a temporary band-aid solution because the java home path is being hard-coded. There is really no way to set the path to get the latest as that is what Apple is supposedly doing for terminal already and the issue is that Apple's java_home environment variable is not getting updated.

Solution no. 7:

Since El Capitan, it is difficult to delete the /usr/bin/java symlink, because of the introduction of the new 'rootless' policy.

Therefore, I simply added the path to the latest java version (in my case this is /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin) to the PATH in my .bashrc file:

To reload your .bashrc file for the current session, run source ~/.bashrc in the shell. You only have to do this for sessions that had been started before changing the .bashrc file.

Now the latest version is used, when you use java in the shell.

Solution no. 8:

Update

Old version
For me the easiest and cleanest way to go is to install Java using homebrew like described here:

Solution no. 9:

The basic issue: /usr/bin/java is pointing to one provided by OSX itself initially (/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java)
We need to point this to the one downloaded by the JDK installer. The below steps are for OSX 10.10.4 Yosemite.

  • Open System Preferences -> select Java. The Java window opens.
  • Click on Java tab at the top. Click on ‘View' button.
  • The Java Runtime Environment Settings tab opens as below:
  • Double click on the Path item and copy the path (cmd+c). This is the latest one installed by the JDK installer/updater. In my case, the path was /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
  • Open terminal. In this step, we are going to point (symbolic link, ln -s command) the system java binary to the latest one, which we discovered in the previous step. Run the below command:

sudo ln -s /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java

Thats it. To verify, you can just run
java -version
on the terminal. It should output the latest version that you installed/updated to.

Solution no. 10:

You can execute following command in your terminal :

And this replaces the java old with new one.

Hope this helps!





broken image