Java Requirements for the JDBC Driver

The Snowflake JDBC driver requires Java 1.7 or higher. If the minimum required version of Java is not installed on the client machines where the JDBC driver is installed, you must install either Oracle Java or OpenJDK.

In this Topic:

Oracle Java

Oracle Java currently supports Java 8. For download and installation instructions, go to:

Java 7 is no longer generally available. For more information about downloading and installing Java 7, go to:

OpenJDK

OpenJDK is an open-source implementation of Java that provides JDK 7 packages for various Linux environments. Packages for non-Linux environments or later Java versions are only available through 3rd parties. For more information, go to:

Client-side Data Encryption Requirements

The JDBC driver uses the AES specification to encrypt files uploaded to Snowflake stages (using PUT) and decrypt downloaded files (via GET). The driver automatically encrypts staged files using 128-bit keys, but also supports encrypting files using 256-bit keys for a higher level of AES encryption.

To use 256-bit keys instead of the default 128-bit keys for encryption of staged files, your account administrator must set the CLIENT_ENCRYPTION_KEY_SIZE account parameter. For more information about setting parameters for your account, see Account Management.

However, to encrypt stage files using 256-bit keys, the Java Runtime Environment (JRE) used by the JDBC driver requires the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files on each machine where the JDBC driver is installed:

  • Oracle Java does not include the policy files; they must be downloaded and installed separately (see below).
  • OpenJDK includes the policy files automatically; no additional tasks are necessary.

The next section provides instructions for installing the policy files for Oracle Java.

Installing the JCE Unlimited Strength Jurisdiction Policy Files for Oracle Java

Attention

Each time you install a new version of Oracle Java on your client machine, you may need to reinstall the policy files as described below.

To install the policy files for Oracle Java:

  1. Download the policy files for your version of Oracle Java:

    The zip file contains a README.txt file and two .jar files.

  2. Install the files. There are 3 possible ways to install the files, depending on your environment:

    • If version 2.4.26 (or higher) of the Snowflake JDBC driver is installed (either stand-alone or through with sfsql), you can connect to Snowflake and attempt to execute a PUT or GET command.

      If the policy files are not installed or installed incorrectly (i.e. the JRE cannot locate the files), the system returns an error, which includes the directory where the JRE expected to find the policy files. You can then copy the files to the directory specified in the error.

      To get the latest version of the driver, download it from the Maven Central Repository. For more information, see Downloading/Integrating the JDBC Driver.

    • If a single version of Java is installed on your client machine, put the two .jar files in the jre/lib/security sub-directory of your Java installation as described in the README.txt file included with the policy files.

      For example, on Mac OS X with Java 8 installed, the directory would be:

      /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/security

    • If multiple versions of Java are installed, the JDBC driver will automatically locate a Java installation to use; however, we recommend using JAVA_HOME to explicitly specify the version to use in your environment:

      • If JAVA_HOME is set, put the .jar files in the jre/lib/security directory for the Java installation referenced in JAVA_HOME.
      • If JAVA_HOME is not set, we recommend putting the .jar files in the lib/security directory for each installed JRE.
  3. After installing the files, you may need to log out of your client and log back in.