⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 urlclassloader.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</DL><HR><A NAME="findClass(java.lang.String)"><!-- --></A><H3>findClass</H3><PRE>protected <A HREF="../../java/lang/Class.html">Class</A> <B>findClass</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)                   throws <A HREF="../../java/lang/ClassNotFoundException.html">ClassNotFoundException</A></PRE><DL><DD>Finds and loads the class with the specified name from the URL search path. Any URLs referring to JAR files are loaded and opened as needed until the class is found.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/ClassLoader.html#findClass(java.lang.String)">findClass</A></CODE> in class <CODE><A HREF="../../java/lang/ClassLoader.html">ClassLoader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the class<DT><B>Returns:</B><DD>the resulting class<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassNotFoundException.html">ClassNotFoundException</A></CODE> - if the class could not be found</DL></DD></DL><HR><A NAME="definePackage(java.lang.String, java.util.jar.Manifest, java.net.URL)"><!-- --></A><H3>definePackage</H3><PRE>protected <A HREF="../../java/lang/Package.html">Package</A> <B>definePackage</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name,                                <A HREF="../../java/util/jar/Manifest.html">Manifest</A>&nbsp;man,                                <A HREF="../../java/net/URL.html">URL</A>&nbsp;url)                         throws <A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></PRE><DL><DD>Defines a new package by name in this ClassLoader. The attributes contained in the specified Manifest will be used to obtain package version and sealing information. For sealed packages, the additional URL specifies the code source URL from which the package was loaded.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the package name<DD><CODE>man</CODE> - the Manifest containing package version and sealing              information<DD><CODE>url</CODE> - the code source url for the package, or null if none<DT><B>Returns:</B><DD>the newly defined Package object<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the package name duplicates              an existing package either in this class loader or one              of its ancestors</DL></DD></DL><HR><A NAME="findResource(java.lang.String)"><!-- --></A><H3>findResource</H3><PRE>public <A HREF="../../java/net/URL.html">URL</A> <B>findResource</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)</PRE><DL><DD>Finds the resource with the specified name on the URL search path.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/ClassLoader.html#findResource(java.lang.String)">findResource</A></CODE> in class <CODE><A HREF="../../java/lang/ClassLoader.html">ClassLoader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the resource<DT><B>Returns:</B><DD>a <code>URL</code> for the resource, or <code>null</code>  if the resource could not be found.</DL></DD></DL><HR><A NAME="findResources(java.lang.String)"><!-- --></A><H3>findResources</H3><PRE>public <A HREF="../../java/util/Enumeration.html">Enumeration</A> <B>findResources</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)                          throws <A HREF="../../java/io/IOException.html">IOException</A></PRE><DL><DD>Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/ClassLoader.html#findResources(java.lang.String)">findResources</A></CODE> in class <CODE><A HREF="../../java/lang/ClassLoader.html">ClassLoader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the resource name<DT><B>Returns:</B><DD>an <code>Enumeration</code> of <code>URL</code>s<DT><B>Throws:</B><DD><CODE>if</CODE> - an I/O exception occurs</DL></DD></DL><HR><A NAME="getPermissions(java.security.CodeSource)"><!-- --></A><H3>getPermissions</H3><PRE>protected <A HREF="../../java/security/PermissionCollection.html">PermissionCollection</A> <B>getPermissions</B>(<A HREF="../../java/security/CodeSource.html">CodeSource</A>&nbsp;codesource)</PRE><DL><DD>Returns the permissions for the given codesource object. The implementation of this method first calls super.getPermissions, to get the permissions granted by the policy, and then adds additional permissions based on the URL of the codesource. <p> If the protocol is "file" and the path specifies a file, then permission to read that file is granted. If protocol is "file" and the path is a directory, permission is granted to read all files and (recursively) all files and subdirectories contained in that directory. <p> If the protocol is not "file", then to connect to and accept connections from the URL's host is granted.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/security/SecureClassLoader.html#getPermissions(java.security.CodeSource)">getPermissions</A></CODE> in class <CODE><A HREF="../../java/security/SecureClassLoader.html">SecureClassLoader</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>codesource</CODE> - the codesource<DT><B>Returns:</B><DD>the permissions granted to the codesource</DL></DD></DL><HR><A NAME="newInstance(java.net.URL[], java.lang.ClassLoader)"><!-- --></A><H3>newInstance</H3><PRE>public static <A HREF="../../java/net/URLClassLoader.html">URLClassLoader</A> <B>newInstance</B>(<A HREF="../../java/net/URL.html">URL</A>[]&nbsp;urls,                                         <A HREF="../../java/lang/ClassLoader.html">ClassLoader</A>&nbsp;parent)</PRE><DL><DD>Creates a new instance of URLClassLoader for the specified URLs and parent class loader. If a security manager is installed, the <code>loadClass</code> method of the URLClassLoader returned by this method will invoke the <code>SecurityManager.checkPackageAccess</code> method before loading the class.<DD><DL><DT><B>Parameters:</B><DD><CODE>urls</CODE> - the URLs to search for classes and resources<DD><CODE>parent</CODE> - the parent class loader for delegation<DT><B>Returns:</B><DD>the resulting class loader</DL></DD></DL><HR><A NAME="newInstance(java.net.URL[])"><!-- --></A><H3>newInstance</H3><PRE>public static <A HREF="../../java/net/URLClassLoader.html">URLClassLoader</A> <B>newInstance</B>(<A HREF="../../java/net/URL.html">URL</A>[]&nbsp;urls)</PRE><DL><DD>Creates a new instance of URLClassLoader for the specified URLs and default parent class loader. If a security manager is installed, the <code>loadClass</code> method of the URLClassLoader returned by this method will invoke the <code>SecurityManager.checkPackageAccess</code> before loading the class.<DD><DL><DT><B>Parameters:</B><DD><CODE>urls</CODE> - the URLs to search for classes and resources<DT><B>Returns:</B><DD>the resulting class loader</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/URLClassLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/net/URL.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/net/URLConnection.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="URLClassLoader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -