diff options
Diffstat (limited to 'libjava/gnu/gcj/runtime/VMClassLoader.java')
-rw-r--r-- | libjava/gnu/gcj/runtime/VMClassLoader.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libjava/gnu/gcj/runtime/VMClassLoader.java b/libjava/gnu/gcj/runtime/VMClassLoader.java index f9ef872..2d46ebc 100644 --- a/libjava/gnu/gcj/runtime/VMClassLoader.java +++ b/libjava/gnu/gcj/runtime/VMClassLoader.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation +/* Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation This file is part of libgcj. @@ -118,6 +118,27 @@ public final class VMClassLoader extends java.net.URLClassLoader instance.init(); } + // Define a package for something loaded natively. + void definePackageForNative(String className) + { + int lastDot = className.lastIndexOf('.'); + if (lastDot != -1) + { + String packageName = className.substring(0, lastDot); + if (getPackage(packageName) == null) + { + // FIXME: this assumes we're defining the core, which + // isn't necessarily so. We could detect this and set up + // appropriately. We could also look at a manifest file + // compiled into the .so. + definePackage(packageName, "Java Platform API Specification", + "GNU", "1.4", "gcj", "GNU", + null, // FIXME: gcj version. + null); + } + } + } + // This keeps track of shared libraries we've already tried to load. private HashSet tried_libraries = new HashSet(); |