diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java b/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java index 321cfe370a7b3..c4864883788d9 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java @@ -139,7 +139,8 @@ public class NarClassLoader extends URLClassLoader { private static final String TMP_DIR_PREFIX = "pulsar-nar"; - public static final String DEFAULT_NAR_EXTRACTION_DIR = System.getProperty("java.io.tmpdir"); + public static final String DEFAULT_NAR_EXTRACTION_DIR = System.getProperty("nar.extraction.tmpdir") != null + ? System.getProperty("nar.extraction.tmpdir") : System.getProperty("java.io.tmpdir"); static NarClassLoader getFromArchive(File narPath, Set additionalJars, ClassLoader parent, String narExtractionDirectory)