Created
January 8, 2017 03:33
-
-
Save mojavelinux/29ec4f7dc668e0adba14ba91732b3f97 to your computer and use it in GitHub Desktop.
A portable way to get the install path of the current JDK.
This file contains 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
#!/bin/sh | |
jrunscript -e 'print(java.lang.System.getProperty("java.home").replaceAll("\\"+java.io.File.separator+"jre$",""))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment