< prev index next >

src/java.base/share/classes/sun/launcher/LauncherHelper.java

Print this page

        

*** 582,600 **** // load the main class cn = cn.replace('/', '.'); Class<?> mainClass = null; ClassLoader scl = ClassLoader.getSystemClassLoader(); try { ! mainClass = scl.loadClass(cn); } catch (NoClassDefFoundError | ClassNotFoundException cnfe) { if (System.getProperty("os.name", "").contains("OS X") && Normalizer.isNormalized(cn, Normalizer.Form.NFD)) { try { ! // On Mac OS X since all names with diacretic symbols are given as decomposed it ! // is possible that main class name comes incorrectly from the command line ! // and we have to re-compose it ! mainClass = scl.loadClass(Normalizer.normalize(cn, Normalizer.Form.NFC)); } catch (NoClassDefFoundError | ClassNotFoundException cnfe1) { abort(cnfe, "java.launcher.cls.error1", cn); } } else { abort(cnfe, "java.launcher.cls.error1", cn); --- 582,602 ---- // load the main class cn = cn.replace('/', '.'); Class<?> mainClass = null; ClassLoader scl = ClassLoader.getSystemClassLoader(); try { ! mainClass = Class.forName(cn, false, scl); } catch (NoClassDefFoundError | ClassNotFoundException cnfe) { if (System.getProperty("os.name", "").contains("OS X") && Normalizer.isNormalized(cn, Normalizer.Form.NFD)) { try { ! // On Mac OS X since all names with diacretic symbols are ! // given as decomposed it is possible that main class name ! // comes incorrectly from the command line and we have ! // to re-compose it ! String ncn = Normalizer.normalize(cn, Normalizer.Form.NFC); ! mainClass = Class.forName(ncn, false, scl); } catch (NoClassDefFoundError | ClassNotFoundException cnfe1) { abort(cnfe, "java.launcher.cls.error1", cn); } } else { abort(cnfe, "java.launcher.cls.error1", cn);
< prev index next >