[java-idp-integration-tests] branch master updated: IDP-843 - Run IdP using Java found via java.home system property.
Tom Zeller
tzeller at dragonacea.biz
Thu May 19 16:57:54 EDT 2016
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch master
in repository java-idp-integration-tests.
The following commit(s) were added to refs/heads/master by this push:
new 59b4392 IDP-843 - Run IdP using Java found via java.home system property.
59b4392 is described below
commit 59b4392263202a8bdd2760174f620eda637a62b0
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu May 19 15:51:42 2016 -0500
IDP-843 - Run IdP using Java found via java.home system property.
Allows caller to control the version of Java used to run the IdP via the
JAVA_HOME environment variable.
---
src/test/java/net/shibboleth/idp/test/JettyServerProcess.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
index 69a2396..2d23394 100644
--- a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
+++ b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
@@ -196,9 +196,16 @@ public class JettyServerProcess extends AbstractInitializableComponent implement
throw new ComponentInitializationException("Path to idp.home '" + idpHome + "' not found.");
}
+ // Throw exception if path to java does not exist.
+ final Path pathToJava = Paths.get(System.getProperty("java.home"), "bin", "java");
+ if (!pathToJava.toAbsolutePath().toFile().exists()) {
+ log.error("Path to java '{}' not found", pathToJava);
+ throw new ComponentInitializationException("Path to java '" + pathToJava + "' not found.");
+ }
+
// Setup commands to start the Jetty process.
commands = new ArrayList<>();
- commands.add("java");
+ commands.add(pathToJava.toAbsolutePath().toString());
commands.add("-Didp.home=" + idpHome);
commands.add("-jar");
commands.add(pathToJettyHome.toAbsolutePath().toString() + "/start.jar");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list