Working MacOS 12 on Intel {hardware}. Present java runtime is Java 8:
Java(TM) SE Runtime Setting (construct 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (construct 25.341-b10, combined mode)
and that is /usr/bin/java
.
For efficiency measurements, I want to have additionally the next Java model accessible; presently I am solely eager about JRE, not JDK. I wish to see whether or not the identical Java Byte code reveals totally different timing und totally different JRE variations (maybe because of totally different rubbish collectors?).
My plan was to put in the next Java in, say, $HOME/java
. Once I run my utility, I can explicitly specify absolutely the path to the java I wish to run. Nonetheless I do not understand how to do that. That is how I proceeded:
- I googled for the chance to obtain JRE, however did not discover something.
- I then discovered the location http://java.oracle.com/ and it affords solely the SDK variations. Effectively, it is overkill, however then let’s obtain the entire SDK. This must also embrace the runtime.
- I downloaded https://obtain.oracle.com/java/21/newest/jdk-21_macos-x64_bin.dmg
- I double-clicked the DMG and located inside a file
JDK 21.0.4.pkg
, which appears to be the installer. - Executing the installer, I discovered that there are written menu entries Instruction, Vacation spot choose, Set up kind, Set up, however I can’t go to the merchandise Vacation spot choose. The set up at all times proceeds on to Set up kind, and affords solely the “customary set up” (which more than likely means changing my present Java by the brand new one).
So I ponder what I can do to have two Javas on my Mac? If I may get from someplace simply the binaries in a zipper file, I may unpack them right into a listing of my liking ….