Commit 6ca77e6f by Ranjit Mathew Committed by Ranjit Mathew

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
parent a80e0e83
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> 2004-06-18 Graydon Hoare <graydon@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:
......
...@@ -67,6 +67,8 @@ public final class VMClassLoader extends java.net.URLClassLoader ...@@ -67,6 +67,8 @@ public final class VMClassLoader extends java.net.URLClassLoader
try try
{ {
File dir = new File (dirname); File dir = new File (dirname);
if (dir.exists ())
{
if (! dirname.endsWith (File.separator)) if (! dirname.endsWith (File.separator))
dirname = dirname + File.separator; dirname = dirname + File.separator;
String files[] String files[]
...@@ -81,6 +83,7 @@ public final class VMClassLoader extends java.net.URLClassLoader ...@@ -81,6 +83,7 @@ public final class VMClassLoader extends java.net.URLClassLoader
for (int i = files.length - 1; i >= 0; i--) for (int i = files.length - 1; i >= 0; i--)
addURL(new URL("file", "", -1, dirname + files[i])); addURL(new URL("file", "", -1, dirname + files[i]));
} }
}
catch (Exception x) catch (Exception x)
{ {
// Just ignore any badness. // Just ignore any badness.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment