Last active
August 9, 2020 07:06
-
-
Save thanoojgithub/10ff5a523b20c3a3256e318534dafe50 to your computer and use it in GitHub Desktop.
How to find java.home
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Linux and macOS, let's use grep: | |
java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | |
And for Windows, let's use findstr: | |
java -XshowSettings:properties -version 2>&1 | findstr "java.home" | |
---------------------------------------------------------------------------------------------------- | |
thanooj-ubuntu@thanoojubuntu-Inspiron-3521:/bin$ java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | |
java.home = /usr/lib/jvm/java-11-openjdk-amd64 | |
thanooj-ubuntu@thanoojubuntu-Inspiron-3521:/bin$ | |
------------------------------------------------------------------------------------------------- | |
thanooj-ubuntu@thanoojubuntu-Inspiron-3521:/bin$ java -XshowSettings:properties -version | |
Property settings: | |
awt.toolkit = sun.awt.X11.XToolkit | |
file.encoding = UTF-8 | |
file.separator = / | |
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment | |
java.awt.printerjob = sun.print.PSPrinterJob | |
java.class.path = | |
java.class.version = 55.0 | |
java.home = /usr/lib/jvm/java-11-openjdk-amd64 | |
java.io.tmpdir = /tmp | |
java.library.path = /usr/java/packages/lib | |
/usr/lib/x86_64-linux-gnu/jni | |
/lib/x86_64-linux-gnu | |
/usr/lib/x86_64-linux-gnu | |
/usr/lib/jni | |
/lib | |
/usr/lib | |
java.runtime.name = OpenJDK Runtime Environment | |
java.runtime.version = 11.0.8+10-post-Ubuntu-0ubuntu120.04 | |
java.specification.name = Java Platform API Specification | |
java.specification.vendor = Oracle Corporation | |
java.specification.version = 11 | |
java.vendor = Ubuntu | |
java.vendor.url = https://ubuntu.com/ | |
java.vendor.url.bug = https://bugs.launchpad.net/ubuntu/+source/openjdk-lts | |
java.version = 11.0.8 | |
java.version.date = 2020-07-14 | |
java.vm.compressedOopsMode = 32-bit | |
java.vm.info = mixed mode, sharing | |
java.vm.name = OpenJDK 64-Bit Server VM | |
java.vm.specification.name = Java Virtual Machine Specification | |
java.vm.specification.vendor = Oracle Corporation | |
java.vm.specification.version = 11 | |
java.vm.vendor = Ubuntu | |
java.vm.version = 11.0.8+10-post-Ubuntu-0ubuntu120.04 | |
jdk.debug = release | |
line.separator = \n | |
os.arch = amd64 | |
os.name = Linux | |
os.version = 5.4.0-42-generic | |
path.separator = : | |
sun.arch.data.model = 64 | |
sun.boot.library.path = /usr/lib/jvm/java-11-openjdk-amd64/lib | |
sun.cpu.endian = little | |
sun.cpu.isalist = | |
sun.desktop = gnome | |
sun.io.unicode.encoding = UnicodeLittle | |
sun.java.launcher = SUN_STANDARD | |
sun.jnu.encoding = UTF-8 | |
sun.management.compiler = HotSpot 64-Bit Tiered Compilers | |
sun.os.patch.level = unknown | |
user.country = IN | |
user.dir = /usr/bin | |
user.home = /home/thanooj-ubuntu | |
user.language = en | |
user.name = thanooj-ubuntu | |
user.timezone = | |
openjdk version "11.0.8" 2020-07-14 | |
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04) | |
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing) | |
thanooj-ubuntu@thanoojubuntu-Inspiron-3521:/bin$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment