1 /* |
1 /* |
2 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
60 import java.net.URI; |
60 import java.net.URI; |
61 import java.nio.charset.Charset; |
61 import java.nio.charset.Charset; |
62 import java.nio.file.DirectoryStream; |
62 import java.nio.file.DirectoryStream; |
63 import java.nio.file.Files; |
63 import java.nio.file.Files; |
64 import java.nio.file.Path; |
64 import java.nio.file.Path; |
|
65 import java.security.AccessControlException; |
65 import java.text.Normalizer; |
66 import java.text.Normalizer; |
66 import java.text.MessageFormat; |
67 import java.text.MessageFormat; |
67 import java.util.ArrayList; |
68 import java.util.ArrayList; |
68 import java.util.Collections; |
69 import java.util.Collections; |
69 import java.util.Comparator; |
70 import java.util.Comparator; |
722 c = Class.forName(m, cn); |
723 c = Class.forName(m, cn); |
723 } |
724 } |
724 } catch (LinkageError le) { |
725 } catch (LinkageError le) { |
725 abort(null, "java.launcher.module.error3", mainClass, m.getName(), |
726 abort(null, "java.launcher.module.error3", mainClass, m.getName(), |
726 le.getClass().getName() + ": " + le.getLocalizedMessage()); |
727 le.getClass().getName() + ": " + le.getLocalizedMessage()); |
|
728 } catch (AccessControlException ace) { |
|
729 abort(ace, "java.launcher.module.error5", mainClass, m.getName(), |
|
730 ace.getClass().getName(), ace.getLocalizedMessage()); |
727 } |
731 } |
728 if (c == null) { |
732 if (c == null) { |
729 abort(null, "java.launcher.module.error2", mainClass, mainModule); |
733 abort(null, "java.launcher.module.error2", mainClass, mainModule); |
730 } |
734 } |
731 |
735 |
778 } |
782 } |
779 } |
783 } |
780 } catch (LinkageError le) { |
784 } catch (LinkageError le) { |
781 abort(le, "java.launcher.cls.error6", cn, |
785 abort(le, "java.launcher.cls.error6", cn, |
782 le.getClass().getName() + ": " + le.getLocalizedMessage()); |
786 le.getClass().getName() + ": " + le.getLocalizedMessage()); |
|
787 } catch (AccessControlException ace) { |
|
788 abort(ace, "java.launcher.cls.error7", cn, |
|
789 ace.getClass().getName(), ace.getLocalizedMessage()); |
783 } |
790 } |
784 return mainClass; |
791 return mainClass; |
785 } |
792 } |
786 |
793 |
787 /* |
794 /* |
819 abort(null, "java.launcher.cls.error4", mainClass.getName(), |
826 abort(null, "java.launcher.cls.error4", mainClass.getName(), |
820 JAVAFX_APPLICATION_CLASS_NAME); |
827 JAVAFX_APPLICATION_CLASS_NAME); |
821 } catch (Throwable e) { |
828 } catch (Throwable e) { |
822 if (mainClass.getModule().isNamed()) { |
829 if (mainClass.getModule().isNamed()) { |
823 abort(e, "java.launcher.module.error5", |
830 abort(e, "java.launcher.module.error5", |
824 mainClass.getName(), mainClass.getModule(), |
831 mainClass.getName(), mainClass.getModule().getName(), |
825 e.getClass().getName(), e.getLocalizedMessage()); |
832 e.getClass().getName(), e.getLocalizedMessage()); |
826 } else { |
833 } else { |
827 abort(e, "java.launcher.cls.error7", mainClass.getName(), |
834 abort(e, "java.launcher.cls.error7", mainClass.getName(), |
828 e.getClass().getName(), e.getLocalizedMessage()); |
835 e.getClass().getName(), e.getLocalizedMessage()); |
829 } |
836 } |