< prev index next >

src/share/classes/java/lang/ClassLoader.java

Print this page
rev 10818 : 8081674: EmptyStackException at startup if running with extended or unsupported charset
Reviewed-by: mchung

*** 1,7 **** /* ! * Copyright (c) 2013, 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 --- 1,7 ---- /* ! * Copyright (c) 2013, 2015, 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
*** 1688,1697 **** --- 1688,1699 ---- */ protected String findLibrary(String libname) { return null; } + static native String findBuiltinLib(String name); + /** * The inner class NativeLibrary denotes a loaded native library instance. * Every classloader contains a vector of loaded native libraries in the * private field <tt>nativeLibraries</tt>. The native libraries loaded * into the system are entered into the <tt>systemNativeLibraries</tt>
*** 1722,1732 **** boolean loaded; native void load(String name, boolean isBuiltin); native long find(String name); native void unload(String name, boolean isBuiltin); - static native String findBuiltinLib(String name); public NativeLibrary(Class<?> fromClass, String name, boolean isBuiltin) { this.name = name; this.fromClass = fromClass; this.isBuiltin = isBuiltin; --- 1724,1733 ----
*** 1865,1875 **** throw new UnsatisfiedLinkError("no " + name + " in java.library.path"); } private static boolean loadLibrary0(Class<?> fromClass, final File file) { // Check to see if we're attempting to access a static library ! String name = NativeLibrary.findBuiltinLib(file.getName()); boolean isBuiltin = (name != null); if (!isBuiltin) { boolean exists = AccessController.doPrivileged( new PrivilegedAction<Object>() { public Object run() { --- 1866,1876 ---- throw new UnsatisfiedLinkError("no " + name + " in java.library.path"); } private static boolean loadLibrary0(Class<?> fromClass, final File file) { // Check to see if we're attempting to access a static library ! String name = findBuiltinLib(file.getName()); boolean isBuiltin = (name != null); if (!isBuiltin) { boolean exists = AccessController.doPrivileged( new PrivilegedAction<Object>() { public Object run() {
< prev index next >