Archived: Downloading and Installing JDK 13 on Mac

This section describes how to download and install JDK on a macOS computer.

To learn JDBC, you need to have JDK installed on your computer. If you are Mac user, you can follow what I did to download and install JDK 13 on your Mac computer.

1. Go to Oracle Java SE download website at oracle.com/technetwork/java/javase/downloads/index.html.

2. Click "Download" next to "Java Platform (JDK) 13".

3. Click "jdk-13_osx-x64.bin.tar.gz" from the download list. It will be saved to your "Downloads" directory automatically.

4. Start a Terminal window and run commands below to install it.

herong$ cd ~/Downloads

herong$ gunzip jdk-13_osx-x64.bin.tar.gz

herong$ tar -xf jdk-13_osx-64.bin.tar

herong$ sudo mv jdk-13.jdk/ /Library/Java/JavaVirtualMachines/

5. Test the installation, open a command window to try the java command. If you are getting the following output, your installation was ok:

herong$ java -version
java version "13" 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)

herong$ javac -version
javac 13

6. Set the JAVA_HOME environment variable, so other applications can find where JDK is installed. This can be done with an "export" command. The backslash at the end of line indicates that the command continues on the next line.

herong$ export \
   JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home

Congratulations, you have successfully installed JDK on your mac computer!

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 MySQL Installation on Windows

 MySQL JDBC Driver (MySQL Connector/J)

 MySQL - PreparedStatement

 MySQL - Reference Implementation of JdbcRowSet

 MySQL - JBDC CallableStatement

 MySQL CLOB (Character Large Object) - TEXT

 MySQL BLOB (Binary Large Object) - BLOB

 Using Connection Pool with JDBC

Archived Tutorials

Archived: Downloading and Installing JDK 13 on Mac

 Archived: Downloading and Installing JDK 12 on Windows

 Archived: Java SE 8 Installation

 Archived: Java SE 1.6 Update 2 Installation

 Archived: JDK 1.6 Documentation Installation

 Archived: MySQL Connector/J 5.1 - Download and Installation

 Archived: MySQL 5.0 Download, Installation and Start

 Archived: mysqladmin - MySQL 5.0 Admin Tool

 Archived: MySQL Connector/J 5.0 - Download and Installation

 Archived: Loading MySQL Connector Java 5.0

 Archived: Installation of JdbcRowSet 1.0 Reference Implementation

 References

 Full Version in PDF/EPUB