2

Is it possible to install jre6 using brew or sdkman? I tried:

$ brew install jre6
Updating Homebrew...
Error: No available formula with the name "jre6"

$ brew install java6
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

$ sdk list java
================================================================================
Available Java Versions
================================================================================
 Vendor        | Use | Version      | Dist    | Status     | Identifier
--------------------------------------------------------------------------------
 AdoptOpenJDK  |     | 12.0.1.j9    | adpt    |            | 12.0.1.j9-adpt
               |     | 12.0.1.hs    | adpt    |            | 12.0.1.hs-adpt
               |     | 11.0.3.j9    | adpt    |            | 11.0.3.j9-adpt
               |     | 11.0.3.hs    | adpt    |            | 11.0.3.hs-adpt
               |     | 8.0.212.j9   | adpt    |            | 8.0.212.j9-adpt
               |     | 8.0.212.hs   | adpt    |            | 8.0.212.hs-adpt
 Amazon        |     | 11.0.3       | amzn    |            | 11.0.3-amzn
               |     | 8.0.212      | amzn    |            | 8.0.212-amzn
               |     | 8.0.202      | amzn    |            | 8.0.202-amzn
 Azul Zulu     |     | 12.0.1       | zulu    |            | 12.0.1-zulu
               |     | 11.0.3       | zulu    |            | 11.0.3-zulu
               |     | 10.0.2       | zulu    |            | 10.0.2-zulu
               | >>> | 9.0.7        | zulu    | installed  | 9.0.7-zulu
               |     | 8.0.212      | zulu    |            | 8.0.212-zulu
               |     | 8.0.202      | zulu    |            | 8.0.202-zulu
               |     | 7.0.222      | zulu    |            | 7.0.222-zulu
               |     | 7.0.181      | zulu    |            | 7.0.181-zulu
 Azul ZuluFX   |     | 11.0.2       | zulufx  |            | 11.0.2-zulufx
               |     | 8.0.202      | zulufx  |            | 8.0.202-zulufx
 BellSoft      |     | 12.0.1       | librca  |            | 12.0.1-librca
               |     | 11.0.3       | librca  |            | 11.0.3-librca
               |     | 8.0.212      | librca  |            | 8.0.212-librca
 GraalVM       |     | 19.0.2       | grl     |            | 19.0.2-grl
               |     | 19.0.0       | grl     |            | 19.0.0-grl
               |     | 1.0.0        | grl     |            | 1.0.0-rc-16-grl
 Java.net      |     | 14.ea.3      | open    |            | 14.ea.3-open
               |     | 13.ea.27     | open    |            | 13.ea.27-open
               |     | 12.0.1       | open    |            | 12.0.1-open
               |     | 11.0.2       | open    |            | 11.0.2-open
               |     | 10.0.2       | open    |            | 10.0.2-open
               |     | 9.0.4        | open    |            | 9.0.4-open
 SAP           |     | 12.0.1       | sapmchn |            | 12.0.1-sapmchn
               |     | 11.0.3       | sapmchn |            | 11.0.3-sapmchn
================================================================================
Use the Identifier for installation:

    $ sdk install java 11.0.3.hs-adpt

I am trying to run JarInspector app at http://www.codeland.org/

Thank you.

user674669
  • 10,681
  • 15
  • 72
  • 105
  • 4
    Probably not, given that JRE 6 is well beyond its end of life. – Makoto Jul 01 '19 at 06:00
  • 2
    As @Makoto said, it's beyond end of life. It doesn't have any support nor any security updates. What would you like to do? What is your scenario? – Manuel Jul 01 '19 at 06:04
  • 2
    @ManuelPolacek does the scenario matter? This could simply be a legacy project. – Andronicus Jul 01 '19 at 06:28
  • @Andronicus yes, it does... There are many different ways to solve a problem. In example, if it is an old web application, you could let it run sandboxed in a docker container, that your underlying system cannot be attacked. Scenario always matters to improve implementation and options. If you know the software, maybe there is an alternative one. The more you know the better options you get. – Manuel Jul 01 '19 at 06:34
  • @Andronicus One could read this request as "tell me the resource to install java 6 on macos", which renders it off topic immediately. Then the question should at least make a good point why it is nonetheless relevant. You dont need an old java to run an old application. You dont need an old jre to develop for an old java (sure, the build env needs the right jdk, but for source code editing on your dev machine, you can always force the IDE to allow only older syntax). – GhostCat Jul 01 '19 at 06:46
  • I found it here: https://support.apple.com/kb/DL1572?locale=en_US & https://updates.cdn-apple.com/2018/macos/031-33898-20171026-7a797e9e-b8de-11e7-b1fe-c14fbda7e146/javaforosx.dmg – user674669 Jul 01 '19 at 06:56
  • 1
    I am trying to run JarInspector app at http://www.codeland.org/ - it was last updated in 2007. – user674669 Jul 01 '19 at 07:02

3 Answers3

2

The following instructions helped me to install jdk6:

$ brew tap caskroom/versions
$ brew cask install java6

$ /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
user674669
  • 10,681
  • 15
  • 72
  • 105
1

try this:

brew cask install homebrew/cask-versions/java6
Junior Vieira
  • 553
  • 5
  • 5
1

Update 03-2022, OSX Monterey We can install with brew and add manually to sdkman:

brew install --cask homebrew/cask-versions/java6

$ cd ~/.sdkman/candidates/java
$ ln -s /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/ 1.6.0.jdk
$ sdk use java 1.6.0.jdk
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)