This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
checkPackageAccess(name);
try {
if (name.startsWith(NASHORN_PKG_PREFIX)) {
return super.loadClass(name, resolve);
return context.getSharedLoader().loadClass(name);
} catch (final ClassNotFoundException | SecurityException e) {
// We'll get ClassNotFoundException for Nashorn 'struct' classes.
// Also, we'll get SecurityException for jdk.nashorn.internal.*
// classes. So, load these using to context's 'shared' loader.
// All these classes start with "jdk.nashorn.internal." prefix.
}
} catch (final ClassNotFoundException ignored) {
// throw the original exception from here
throw e;
// package-private and private stuff below this point