Forum Stats

  • 3,728,153 Users
  • 2,245,559 Discussions
  • 7,853,357 Comments

Discussions

Installation JDK7u45 on OSX 10.11.4 (El Capitan)

3216641
3216641 Member Posts: 1
edited April 2016 in New To Java

For developing purposes I need to install jdk7u45 on my OSX (10.11.4). But there is a problem with the provided dmg. (Java Archive Downloads - Java SE 7).

Inside the package I found a file called Distribution where the pre-installation-version check takes place. Up to jdk-version 1.7u71 this javascript-check is not compatible with El Capitan (11.11.4):

The check is like: if(tProductVersion < supportedVersion)...

but in 1.7.u71 this check is corrected: if(system.compareVersions(tProductVersion, supportedVersion) < 0) ...

Now I have no idea how to install jdk7u45 on my System. I see the following possibilities:

- Use another system (older OS) - what I really don't want.

- Oracle or someone else provides a corrected dmg (most preferred way)

- Install the jdk "by hand" - not shure how this could be done...

- install the jdk on an older OS an then copy the folder /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk to my developing machine

Any more ideas?

Answers

  • Unknown
    edited April 2016
    Any more ideas?
    

    Just the obvious one - use a Java version appropriate for your OS.

    Your thread raises several more questions than what you actually ask.

    All software (os, Java, etc) changes over time. Some changes are NOT backward compatible. That is the PRIMARY reason for version checks - to make sure your environment has a supported combination of hardware and software.

    If you try to use an unsupported combination you do so at your own risk. But I'm sure you already know that.

    For developing purposes I need to install jdk7u45 on my OSX (10.11.4).
    

    Why? Why do you need to 'develop' with an older very of Java? Java has always had command line options to specify the target version you are developing for. So even with the latest version of Java you can develop for prior versions.

    But there is a problem with the provided dmg. (Java Archive Downloads - Java SE 7).
    

    The key question is whether that dmg has the problem or if the problem is really you trying to use it in an unsupported hardware/software combination.

    If you believe the dmg itself has a problem you need to file a bug report with Oracle. Otherwise it falls into the 'use at your own risk' category.

    Up to jdk-version 1.7u71 this javascript-check is not compatible with El Capitan (11.11.4):
    

    Which isn't even a version you say you are using?

    but in 1.7.u71 this check is corrected:  if(system.compareVersions(tProductVersion, supportedVersion) < 0)
    

    Maybe - but more likely 1.7.u71 has changes that support changing the version check.

    Now I have no idea how to install jdk7u45 on my System.
    

    You don't - use a current version of Java and the '-target' command-line parameter to compile the code for what you need

      -target <release>      Generate class files for specific VM version
This discussion has been closed.