mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 06:30:25 +08:00
VMClassLoader.java (init): Add extensions directory only if it actually exists.
* gnu/gcj/runtime/VMClassLoader.java (init): Add extensions directory only if it actually exists. From-SVN: r83347
This commit is contained in:
parent
a80e0e831f
commit
6ca77e6fa4
@ -1,3 +1,8 @@
|
||||
2004-06-18 Ranjit Mathew <rmathew@hotmail.com>
|
||||
|
||||
* gnu/gcj/runtime/VMClassLoader.java (init): Add extensions
|
||||
directory only if it actually exists.
|
||||
|
||||
2004-06-18 Graydon Hoare <graydon@redhat.com>
|
||||
|
||||
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:
|
||||
|
@ -67,19 +67,22 @@ public final class VMClassLoader extends java.net.URLClassLoader
|
||||
try
|
||||
{
|
||||
File dir = new File (dirname);
|
||||
if (! dirname.endsWith (File.separator))
|
||||
dirname = dirname + File.separator;
|
||||
String files[]
|
||||
= dir.list (new FilenameFilter ()
|
||||
{
|
||||
public boolean accept (File dir, String name)
|
||||
{
|
||||
return (name.endsWith (".jar")
|
||||
|| name.endsWith (".zip"));
|
||||
}
|
||||
});
|
||||
for (int i = files.length - 1; i >= 0; i--)
|
||||
addURL(new URL("file", "", -1, dirname + files[i]));
|
||||
if (dir.exists ())
|
||||
{
|
||||
if (! dirname.endsWith (File.separator))
|
||||
dirname = dirname + File.separator;
|
||||
String files[]
|
||||
= dir.list (new FilenameFilter ()
|
||||
{
|
||||
public boolean accept (File dir, String name)
|
||||
{
|
||||
return (name.endsWith (".jar")
|
||||
|| name.endsWith (".zip"));
|
||||
}
|
||||
});
|
||||
for (int i = files.length - 1; i >= 0; i--)
|
||||
addURL(new URL("file", "", -1, dirname + files[i]));
|
||||
}
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user