SMILE GUIDE: INSTALLING JAVA
An extension of Smile Guide: Installing Smile CDR
What to Expect
🕘 Reading time = 1 hour
By the end of this guide, you’ll be able to understand the process of installing Java on a Mac.
Background
While installing Smile CDR, you may encounter a Java runtime error that can be resolved by installing a JRE (Java Runtime Environment) or JDK (Java Developer Kit). Smile CDR will run against a simple JRE (the JDK is not required to use Smile CDR), but the JDK does come with many tools which can be useful for troubleshooting issues (e.g. jstack, jmap, etc.). The JDK versions supported by Smile CDR are Java 16 and Java 11. Although Java 16 is a newer release, Java 11 is the only long-term supported version and is the JDK we suggest you install. This step-by-step guide will explain how to install a JDK, so that your computer can run Java applications such as Smile CDR.
Objectives
The intent of this document is to provide a step-by-step guide to downloading Java on your Mac. One should be able to successfully complete the installation with little to no technical background.
Installing Java—MacOS, Intel x86 processor (Mac 2019 Model or Older)
-
Let’s download Java 11!
Open the following: https://www.oracle.com/ca-en/java/technologies/javase-downloads.html
-
.Click on Java 11, then click on MacOS and finally click on the installer. The following items/knowledge are required:
-
You’ll be prompted to accept the Oracle Technology Network License Agreement for Oracle Java SE. Select the box to accept, then click download.
-
You’ll then be asked to log into your Oracle account. If you don’t have an account, click on “Create Account” at the bottom of the page, then fill out the necessary fields. You may be asked to verify your email address at some point in the process. Once this is complete, you may continue the installation process.
-
After you’ve signed in successfully, the download should begin. Once finished, double click the file you downloaded:
-
After some automatic initialization, a JDK 11.0.13 (or whatever version you’ve downloaded) disk will open with a .pkg file inside. Double click on this file. This process may prompt you to make changes to your device. If this pop up appears, select “Yes.”
-
Voila! You have now installed JDK on MacOS. You can proceed to the Smile CDR installation guide!
Installing Java—MacOS, ARM 64 (Mac 2020 Model or Newer)
Important Note on Rosetta 2
As of November 2020, all Apple laptops are manufactured with an Arm-based Silicone M1 chip. The only version of Java that is compatible with this chip is Java 17, however, Smile does not currently support this version. To rectify the problem, we must also install Rosetta 2, then JDK version 11, which Smile does support. Rosetta 2 is a tool that allows us to run older, non-native Intel x86 apps on the new Mac M1 chips.
There are generally two approaches to installing Rosetta 2
The first approach is done prior to installing a JDK and involves opening your terminal application and entering the following command:
softwareupdate --install-rosetta
This will launch the rosetta installer and you’ll have to agree to a license agreement. Once this is done, you may install Java 11 by following the Installation Instructions below.
The second approach occurs midway through the JDK installation process. If you follow the Installation Instructions below, you will be automatically prompted to install Rosetta (assuming you haven’t already installed Rosetta via the first approach). When this occurs, simply follow the instructions that appear on screen to install Rosetta, then you may proceed with the JDK installation.
Installation Instructions
-
Let’s download Java 11, which is a JDK supported by Smile CDR.
Open the following https://www.oracle.com/ca-en/java/technologies/javase-downloads.html -
Click on Java 11, then click on MacOS and finally click on the installer.
-
You’ll be prompted to accept the Oracle Technology Network License Agreement for Oracle Java SE. Select the box to accept, then click download
-
You’ll then be asked to login to your Oracle account. If you do not have an account, click on “Create Account” at the bottom of the page, then fill out the necessary fields. You may be asked to verify your email address at some point in the process. Once this is complete, you may continue the installation process.
-
After you’ve signed in successfully, the download should begin. Once finished, double click the file you downloaded:
-
After some automatic initialization, a JDK 11.0.3 (or whatever version you’ve downloaded) disk will open with a .pkg file inside. Double click on this file. This process may prompt you to make changes to your device. If this pop up appears, select “Yes."
-
This folder contains the JDK Installer. Follow the instructions on screen to install (you will essentially start by selecting “continue” followed by “install” in the bottom right corner for a few steps). Exit the page by closing the installer pop up page.
-
Voila! You have now installed JDK on MacOS. You can proceed to the Smile CDR Installation Guide.