diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-07-12 18:56:11 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-07-12 18:56:14 -0500 |
commit | b5d91a686cede2fcf45e2b16e0141689d6c35a3f (patch) | |
tree | 5e5a11284763eff9a72350450afb1ca750719b50 /cadi | |
parent | f918e038f8f4eea2fb879edf704683877bc19849 (diff) |
Add JAVA_HOME to check.sh
Issue-ID: AAF-792
Change-Id: Ief0fd9d1b933c20cf0367fbaba2ea3e9f8d67fbb
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi')
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java | 6 | ||||
-rw-r--r-- | cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java index 123bb9df..05ffdbfe 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java @@ -73,7 +73,11 @@ public class PlaceArtifactScripts extends ArtifactDir { "APP="+arti.getNs()+'\n', "EMAIL="+email+ '\n', "JAR=\""+classpath.toString()+"\"\n", - "JAVA=\""+javaHome() + "/bin/" +"java\"\n", + "if [ -z \"$JAVA_HOME\" ]; then \n", + " JAVA=\""+javaHome() + "/bin/" +"java\"\n", + "else\n", + " JAVA=\"$JAVA_HOME/bin/java\"\n", + "fi\n", checkScript ); diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java index b7c0b02c..66ef4b1e 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java @@ -187,6 +187,10 @@ public class DNSLocator implements Locator<URI> { startPort = Integer.parseInt(aaf_locate.substring(left + 1, dash)); endPort = Integer.parseInt(aaf_locate.substring(dash + 1, right)); } + slash = aaf_locate.indexOf('/', start); + if(slash>=0) { + suffix = aaf_locate.substring(slash); + } } else { slash = aaf_locate.indexOf('/', start); @@ -197,6 +201,7 @@ public class DNSLocator implements Locator<URI> { startPort = endPort = Integer.parseInt(aaf_locate.substring(start)); } else { startPort = endPort = Integer.parseInt(aaf_locate.substring(start, slash)); + suffix = aaf_locate.substring(slash); } } } else { |