HHH-8215 - Fix for windows build
This commit is contained in:
parent
f83a2013b1
commit
1b637030bd
|
@ -129,7 +129,10 @@ public class Jdk {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final File javaCommand = getJavaExecutable();
|
final File javaCommand = getJavaExecutable();
|
||||||
Process javaProcess = Runtime.getRuntime().exec( javaCommand.getAbsolutePath() + " -version" );
|
|
||||||
|
// Fix build for e.g. windows when path to java command contains spaces
|
||||||
|
// Using the array for Runtime.exec will make sure that arguments with spaces get quoted
|
||||||
|
Process javaProcess = Runtime.getRuntime().exec( new String[]{javaCommand.getAbsolutePath(), "-version"} );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
version = extractVersion( new BufferedReader( new InputStreamReader( javaProcess.getErrorStream() ) ) );
|
version = extractVersion( new BufferedReader( new InputStreamReader( javaProcess.getErrorStream() ) ) );
|
||||||
|
|
Loading…
Reference in New Issue