Requirements for the JDBC Driver¶
The requirements depend on the driver version. JDBC Driver 5.x is built on the Universal Core and loads a native library, so it has platform requirements that JDBC Driver 4.x doesn’t have.
Requirements for JDBC Driver 5.x¶
For installation steps, see Migrating from JDBC Driver 4.x to 5.x.
Java¶
JDBC Driver 5.x requires a 64-bit Java Virtual Machine (JVM) that runs Java 8 or later. Snowflake tests the driver on Java 8, 11, 17, 21, and 25.
Operating systems and architectures¶
Each platform has a Maven classifier. Use the classifier for the platform where your application runs, or use the snowflake-jdbc-native-all
package, which contains the native library for every available platform.
| Platform | Classifier | Standard package | FIPS package |
|---|---|---|---|
| Linux x86_64 (glibc) | linux-x86_64 | Available | Available |
| Linux aarch64 (glibc) | linux-aarch_64 | Available | Available |
| Linux x86_64 and aarch64 (musl, for example Alpine) | linux-x86_64, linux-aarch_64 | Available | Not available |
| macOS x86_64 | osx-x86_64 | Available | Available |
| macOS aarch64 (Apple silicon) | osx-aarch_64 | Available | Available |
| Windows x86_64 | windows-x86_64 | Available | Available |
| Windows ARM64 | windows-aarch_64 | Available | Not available |
On Linux, the glibc and musl libraries are packaged under the same classifier, and the driver selects the one that matches the host at runtime.
- The glibc library requires glibc 2.28 or later.
- On musl-based distributions such as Alpine Linux, install
libgcc:apk add --no-cache libgcc. - If the driver can’t detect the C library, it selects glibc. On a musl host, set
-Djdbc.libc=muslin that case.
For what the FIPS package is and isn’t, see FIPS 140-3 considerations for drivers built on the Universal Core.
Native library loading¶
The driver loads a native library with the Java Native Interface (JNI). The following requirements apply:
-
The JVM must permit JNI and native library loading.
-
java.io.tmpdirmust be writable, must allow execution, and must have about 30 MB of free space. The driver extracts the native library from the jar into that directory and loads it from there. Anoexecmount fails with an error such asfailed to map segment. To use a different directory, set-Djava.io.tmpdir. -
On newer JVMs, start your application with
--enable-native-access=ALL-UNNAMEDso that the driver can load its native library. Without the option, those JVMs warn when the driver loads the library, and a future Java release is expected to block the load.Don’t set this option on Java 8 or Java 11. Those JVMs don’t recognize it and fail to start.
Components that you don’t need¶
JDBC Driver 5.x doesn’t use the following components, and it doesn’t require them on the client machine:
- Java Native Access (JNA). Don’t add the JNA jars.
- The Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. The native library encrypts and decrypts staged files.
- A JVM trust store for Snowflake connections. Use the driver’s own certificate settings instead. For details about these and other JVM settings that no longer apply, see Native library and JVM settings.
Requirements for JDBC Driver 4.x¶
JDBC Driver 4.x requires Java LTS (Long-Term Support) versions 1.8 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.
For the libraries that 4.x needs on the classpath, such as JNA, and for the JVM option that Java 16 and later require, see “Runtime dependencies” in Configuring the JDBC Driver.
Note
If you use JDK 1.8 u91 or earlier, or if you use a custom trust store, please read the DigiCert Global Root G2 certificate authority (CA) TLS certificate updates Knowledge Base article for information about updating the trust store with the required certificate.
Oracle Java¶
Oracle Java currently supports Java 8.
For download and installation instructions, go to:
http://www.java.com/en/download/manual.jsp
OpenJDK¶
OpenJDK is an open-source implementation of Java that provides JDK 8 packages for various Linux environments. Packages for non-Linux environments or higher Java versions are only available through 3rd parties.
For more information, go to:
http://openjdk.java.net
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 Parameter 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:
-
Download the policy files for your version of Oracle Java.
- JCE Unlimited Strength Jurisdiction Policy Files 8 Download
- JCE Unlimited Strength Jurisdiction Policy Files 7 Download
The zip file contains a
README.txtfile and two.jarfiles. -
Install the files. Depending on your environment, you can install the files in the following ways:
-
If version 2.4.26 (or higher) of the Snowflake JDBC driver is installed, 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.
-
If a single version of Java is installed on your client machine, put the two
.jarfiles in thejre/lib/securitysub-directory of your Java installation as described in theREADME.txtfile included with the policy files.For example, on macOS 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
.jarfiles in thejre/lib/securitydirectory for the Java installation referenced in JAVA_HOME. - If JAVA_HOME is not set, we recommend putting the
.jarfiles in thelib/securitydirectory for each installed JRE.
- If JAVA_HOME is set, put the
-
-
After installing the files, you may need to log out of your client and log back in.