accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwa...@apache.org
Subject [accumulo] branch 1.9 updated: Support running MiniAccumuloCluster using Java 11 (#924)
Date Thu, 07 Feb 2019 22:31:23 GMT
This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.9 by this push:
     new 61c4491  Support running MiniAccumuloCluster using Java 11 (#924)
61c4491 is described below

commit 61c44919de22c92c98287e810467fc0df56bd87e
Author: Mike Walch <mwalch@apache.org>
AuthorDate: Thu Feb 7 17:19:50 2019 -0500

    Support running MiniAccumuloCluster using Java 11 (#924)
---
 .../minicluster/impl/MiniAccumuloClusterImpl.java        | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 81bdebd..866038b 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -268,8 +268,20 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
               append(classpathBuilder, f.getURL());
             }
           } else {
-            throw new IllegalArgumentException(
-                "Unknown classloader type : " + classLoader.getClass().getName());
+            if (classLoader.getClass().getName()
+                .equals("jdk.internal.loader.ClassLoaders$AppClassLoader")) {
+              log.debug("Detected Java 11 classloader: {}", classLoader.getClass().getName());
+            } else {
+              log.debug("Detected unknown classloader: {}", classLoader.getClass().getName());
+            }
+            String javaClassPath = System.getProperty("java.class.path");
+            if (javaClassPath == null) {
+              throw new IllegalStateException("java.class.path is not set");
+            } else {
+              log.debug("Using classpath set by java.class.path system property: {}",
+                  javaClassPath);
+            }
+            classpathBuilder.append(File.pathSeparator).append(javaClassPath);
           }
         }
       } else {


Mime
View raw message