This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/jdk-16-17 by this push:
     new cfa4426  fix
cfa4426 is described below

commit cfa44266c28a6fa472f3507a15e3fee12ca79781
Author: tibordigana <[email protected]>
AuthorDate: Fri Feb 26 10:14:05 2021 +0100

    fix
---
 pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 6d186a9..e996320 100644
--- a/pom.xml
+++ b/pom.xml
@@ -675,7 +675,9 @@
                         <source>
                             jdkHome = 
session.getUserProperties().getProperty("jdk.home", 
project.getProperties().getProperty("jdk.home"));
                             if (jdkHome == null || jdkHome.isEmpty()) {
-                                jdkHome = System.getProperty("java.home");
+                                jreHome = System.getProperty("java.home");
+                                jrePath = new File(jreHome);
+                                jdkHome = "jre".equals(jrePath.getName()) ? 
jrePath.getParent() : jrePath.getPath();
                             }
                             release = new File(jdkHome, "release");
                             System.out.println("Beanshell found jdkHome=" + 
jdkHome);

Reply via email to