mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-8215 - Fix for windows build
This commit is contained in:
parent
f83a2013b1
commit
1b637030bd
@ -129,7 +129,10 @@ private String extractFromSunJdk() {
|
||||
|
||||
try {
|
||||
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 {
|
||||
version = extractVersion( new BufferedReader( new InputStreamReader( javaProcess.getErrorStream() ) ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user