Created
November 10, 2015 20:16
-
-
Save jasontedor/f063959c34097d5f1add to your computer and use it in GitHub Desktop.
More robust handling of jps executable on Windows
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
File jps | |
if (Os.isFamily(Os.FAMILY_WINDOWS)) { | |
jps = getJpsExecutableByName("jps.exe") | |
} else { | |
jps = getJpsExecutableByName("jps") | |
} | |
if (!jps.exists()) { | |
throw new GradleException("jps executable not found; ensure that you're running Gradle with the JDK rather than the JRE") | |
} | |
commandLine jps, '-l' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment