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. Notably, DbVisualizer is not compatible with newer major versions of Java than it was developed for. 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.
- In the DbVisualizer installation directory there is an .install4j directory,
- In this directory create a file named pref_jre.cfg if it doesn't already exist,
- Open the file in a text editor,
- 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:
- Java installed with DbVisualizer in DbVisualizer.app/Contents/PlugIns/jre.bundle
- Any installed Java (JRE) in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
- 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
- Open a Terminal window
- Execute: cd /Applications/DbVisualizer.app/Contents/Resources
- 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 - 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 - Start DbVisualizer. It now uses the Java version specified by the symbolic link
For DbVisualizer version prior to 14
- Open a Terminal window
- Execute: cd /Applications/DbVisualizer.app/Contents
- If the PlugIns folder doesn't exist create it with: mkdir PlugIns
- Execute: cd Plugins
- 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 - 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 - Start DbVisualizer. It now uses the Java version specified by the symbolic link