--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,7 @@
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.security.AccessControlException;
import java.text.Normalizer;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -724,6 +725,9 @@
} catch (LinkageError le) {
abort(null, "java.launcher.module.error3", mainClass, m.getName(),
le.getClass().getName() + ": " + le.getLocalizedMessage());
+ } catch (AccessControlException ace) {
+ abort(ace, "java.launcher.module.error5", mainClass, m.getName(),
+ ace.getClass().getName(), ace.getLocalizedMessage());
}
if (c == null) {
abort(null, "java.launcher.module.error2", mainClass, mainModule);
@@ -780,6 +784,9 @@
} catch (LinkageError le) {
abort(le, "java.launcher.cls.error6", cn,
le.getClass().getName() + ": " + le.getLocalizedMessage());
+ } catch (AccessControlException ace) {
+ abort(ace, "java.launcher.cls.error7", cn,
+ ace.getClass().getName(), ace.getLocalizedMessage());
}
return mainClass;
}
@@ -821,7 +828,7 @@
} catch (Throwable e) {
if (mainClass.getModule().isNamed()) {
abort(e, "java.launcher.module.error5",
- mainClass.getName(), mainClass.getModule(),
+ mainClass.getName(), mainClass.getModule().getName(),
e.getClass().getName(), e.getLocalizedMessage());
} else {
abort(e, "java.launcher.cls.error7", mainClass.getName(),