Mac OS X and multiple Java versions

How can I install an additional java on MacOS? I installed jdk8 and that works fine. But now I need a jdk7 installation for development purposes. When trying to install the old version via DMG file, i get a warning, that there is already a newer version of java installed and the installer quits.

    /usr/libexec/java_home -verbose
    Matching Java Virtual Machines (1):
        1.8.0_20, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home

       /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home

How to install jdk7 in addition to this one?

18 Answers
18

Leave a Comment