How to install java jdk 7 on Snow Leopard

后端 未结 9 2228
忘掉有多难
忘掉有多难 2020-11-30 22:22

My Mac currently is running Snow Leopard (10.6.8), and I would like to develop with Java 7. I downloaded the Java 7 OS X installer from Oracle\'s website, started to run it.

9条回答
  •  无人及你
    2020-11-30 22:40

    I was able to compile openJDK 7 for snow leopard (works entirely, AWT included), from some patches at this project:
    https://github.com/hgomez/obuildfactory/

    If you want my binaries for a little bit of an easier time, here they are:
    https://bintray.com/wyatt8740/generic/openjdk7-sdk-osx-10.6/20140622/view

    The tarball is about 57 megabytes.

    Extract it under /Library/Java/JavaVirtualMachines/. The JDK will be in a directory called jdk1.7.0.jdk. Set your JAVA_HOME environment variable to /Library/Java/JavaVirtualMachines/jdk1.7.0.jdk/Contents/Home, and from then put the command for setting JAVA_HOME in your ~/.profile to make it more permanent. Log out and in for it to take full effect. The only thing missing so far is a JDK 7 browser plugin.

    You can also use the "Java preferences' app (can be found in spotlight search) to set it to the default when accessed via GUI as well.

    Unfortunately, I don't have access to OS X at the moment to try to make java 1.8 work, so 1.7 is probably the end of the road for 10.6.

提交回复
热议问题