Note: When changing the Java version you must change to a Java version that is supported by DbVisualizer for the specific platform. Please see the Download page for which java versions that are supported.
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
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 :
- 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