< prev index next >
src/java.base/share/classes/sun/launcher/LauncherHelper.java
Print this page
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -60,10 +60,11 @@
import java.net.URI;
import java.nio.charset.Charset;
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;
import java.util.Collections;
import java.util.Comparator;
@@ -722,10 +723,13 @@
c = Class.forName(m, cn);
}
} 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);
}
@@ -778,10 +782,13 @@
}
}
} 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;
}
/*
< prev index next >