Note: We recommend to always install DbVisualizer with bundled Java unless you have a strong reason not to do so. We bundle the most current long-term support Java version that we have tested and that we know works with the current version of DbVisualizer on the given platform. Our experience is that even minor versions of Java can introduce significant changes, which makes switching the Java runtime manually risky.

As a general rule, updating DbVisualizer regularly on all client machines should be the preferred strategy. Apart from new features, improvements and fixes, third-party components and the Java runtime are updated on a regular basis to ensure security, compatibility and performance.


Note: When changing the Java version, make sure that the version you are changing to is compatible with your specific version of DbVisualizer on your platform. Please see the System Requirements section on the Download page for more details.

Windows/Unix/Linux


Make sure you are using DbVisualizer which do not bundle Java with the DbVisualizer installation. Verify this by checking in the DbVisualizer installation folder that there is no jre folder there.

  1. In the DbVisualizer installation directory there is an .install4j directory,
  2. In this directory create a file named pref_jre.cfg if it doesn't already exist,
  3. Open the file in a text editor,
  4. Add the complete path to the root directory for the Java installation you want to use.
    Examples: Windows: C:\Program Files\Java\jre8, Linux/UNIX: /usr/java/jdk1.8.0_131

An alternative solution is to set the DBVIS_JAVA_HOME environment variable to point to the root directory for the Java installation.

Example: DBVIS_JAVA_HOME=C:\Program Files\Java\jre8


macOS

On macOS, this is the search order for Java when launching DbVisualizer:

  1. Java installed with DbVisualizer in DbVisualizer.app/Contents/PlugIns/jre.bundle
  2. Any installed Java (JRE) in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  3. Last, it looks for a matching Java (JDK) version in /Library/Java/JavaVirtualMachines

If you want to use a different Java version, you must download and install the Java JDK for that version (there is no way to select a specific JRE version). The new JDK version is installed in /Library/Java/JavaVirtualMachines/.


Do as follows to change so that DbVisualizer uses the new Java version, assuming DbVisualizer is installed in the default /Applications/DbVisualizer.app folder :


For DbVisualizer 14 and later

  1. Open a Terminal window
  2. Execute: cd /Applications/DbVisualizer.app/Contents/Resources 
  3. If there is a jre.bundle link or folder in the Resources folder, rename it (for backup purposes) with:
    mv jre.bundle jre.bundle.ORG
  4. Create a symbolic link to the Java version you want to use, e.g.: 
    ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk jre.bundle
  5. Start DbVisualizer. It now uses the Java version specified by the symbolic link


For DbVisualizer version prior to 14

  1. Open a Terminal window
  2. Execute: cd /Applications/DbVisualizer.app/Contents 
  3. If the PlugIns folder doesn't exist create it with: mkdir PlugIns
  4. Execute: cd Plugins
  5. If there is a jre.bundle link or folder in the PlugIns folder, rename it (for backup purposes) with: 
    mv jre.bundle jre.bundle.ORG
  6. Create a symbolic link to the Java version you want to use, e.g.: 
    ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk jre.bundle
  7. Start DbVisualizer. It now uses the Java version specified by the symbolic link