How do I install Java 1.6 Macintosh?

534    Asked by AlisonKelly in Java , Asked on Oct 13, 2022

When I upgrade to Mavericks, it uninstalls Java 1.6. I can install Java 7, but for some applications and development work, I still need access to Java 6. How can I reinstall Java 6 in Mavericks?


Apple docs generally recommend downloading Java directly from Oracle, but I don't see a Mac version listed on the Oracle download page for Java SE 6.


http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR


Update


I was able to install parts of Java 6, with an Apple Support update. But Maven is still missing.


$ specs java os
Specs:
specs 0.7
https://github.com/mcandre/specs#readme
mvn --version
mvn not found
echo $CLASSPATH


echo $JAVA_HOME
/Library/Java/Home
javac -version
javac 1.6.0_65
java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
system_profiler SPSoftwareDataType | grep 'System Version'
      System Version: OS X 10.9 (13A603)
Update 2
I was able to install Maven with Homebrew:
$ brew install maven
$ mvn --version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
Maven home: /usr/local/Cellar/maven/3.1.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"


Answered by David Edmunds

You can download Java 1.6 Macintosh for OS X from here: http://support.apple.com/kb/DL1572


For Maven support you can use brew (as stated above) or, if you don't want to install brew just for Maven support, you can download it directly from maven.apache.org. Here's the steps I took to get Maven setup on a fresh install of Mavericks:

curl -O http://apache.tradebit.com/pub/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
sudo mkdir /usr/local
cd /usr/local
sudo tar -xf ~/apache-maven-3.1.1-bin.tar.gz
echo "export PATH=$PATH:/usr/local/apache-maven-3.1.1/bin" >> .profile
echo "export JAVA_HOME=/Library/Java/Home" >> .profile

Your Answer

Interviews

Parent Categories