natRuntime.cc (insertSystemProperties): Set gnu.gcj.runtime.endorsed.dirs.
libjava: * java/lang/natRuntime.cc (insertSystemProperties): Set gnu.gcj.runtime.endorsed.dirs. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added HelperClassLoader.java. (AM_CXXFLAGS): Define GCJ_ENDORSED_DIRS. * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Extends HelperClassLoader. (init): Use addDirectoriesFromProperty. * gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Extends HelperClassLoader. Use addDirectoriesFromProperty. Handle gnu.gcj.runtime.endorsed.dirs. * gnu/gcj/runtime/HelperClassLoader.java: New file. gcc/java: * gcj.texi (libgcj Runtime Properties): Document gnu.gcj.runtime.endorsed.dirs. From-SVN: r97207
This commit is contained in:
parent
aa80f4d1b9
commit
dc0a6205e6
@ -1,3 +1,8 @@
|
|||||||
|
2005-03-29 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* gcj.texi (libgcj Runtime Properties): Document
|
||||||
|
gnu.gcj.runtime.endorsed.dirs.
|
||||||
|
|
||||||
2005-03-24 Anthony Green <green@redhat.com>
|
2005-03-24 Anthony Green <green@redhat.com>
|
||||||
|
|
||||||
* gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
|
* gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
|
||||||
|
@ -2515,6 +2515,15 @@ search is done for each requested class. If this property is set to
|
|||||||
tried again. If this property is set to @samp{never}, then lookups
|
tried again. If this property is set to @samp{never}, then lookups
|
||||||
are never done. For more information, @xref{Extensions}.
|
are never done. For more information, @xref{Extensions}.
|
||||||
|
|
||||||
|
@item gnu.gcj.runtime.endorsed.dirs
|
||||||
|
This is like the standard @code{java.endorsed.dirs}, property, but
|
||||||
|
specifies some extra directories which are searched after the standard
|
||||||
|
endorsed directories. This is primarily useful for telling
|
||||||
|
@code{libgcj} about additional libraries which are ordinarily
|
||||||
|
incorporated into the JDK, and which should be loaded by the bootstrap
|
||||||
|
class loader, but which are not yet part of @code{libgcj} itself for
|
||||||
|
some reason.
|
||||||
|
|
||||||
@item gnu.gcj.jit.compiler
|
@item gnu.gcj.jit.compiler
|
||||||
@c FIXME we should probably have a whole node on this...
|
@c FIXME we should probably have a whole node on this...
|
||||||
This is the full path to @command{gcj} executable which should be
|
This is the full path to @command{gcj} executable which should be
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
2005-03-29 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* java/lang/natRuntime.cc (insertSystemProperties): Set
|
||||||
|
gnu.gcj.runtime.endorsed.dirs.
|
||||||
|
* Makefile.in: Rebuilt.
|
||||||
|
* Makefile.am (ordinary_java_source_files): Added
|
||||||
|
HelperClassLoader.java.
|
||||||
|
(AM_CXXFLAGS): Define GCJ_ENDORSED_DIRS.
|
||||||
|
* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Extends
|
||||||
|
HelperClassLoader.
|
||||||
|
(init): Use addDirectoriesFromProperty.
|
||||||
|
* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Extends
|
||||||
|
HelperClassLoader. Use addDirectoriesFromProperty. Handle
|
||||||
|
gnu.gcj.runtime.endorsed.dirs.
|
||||||
|
* gnu/gcj/runtime/HelperClassLoader.java: New file.
|
||||||
|
|
||||||
2005-03-26 Chris Burdess <dog@gnu.org>
|
2005-03-26 Chris Burdess <dog@gnu.org>
|
||||||
|
|
||||||
* gnu/xml/dom/DomNode.java (notifyNode): grow listener array as
|
* gnu/xml/dom/DomNode.java (notifyNode): grow listener array as
|
||||||
|
@ -186,6 +186,7 @@ AM_CXXFLAGS = \
|
|||||||
-DLIBDIR="\"$(libdir)\"" \
|
-DLIBDIR="\"$(libdir)\"" \
|
||||||
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
|
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
|
||||||
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
|
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
|
||||||
|
-DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
|
||||||
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
|
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
|
||||||
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
|
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
|
||||||
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
|
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
|
||||||
@ -2992,6 +2993,7 @@ gnu/gcj/io/SimpleSHSStream.java \
|
|||||||
gnu/gcj/runtime/BootClassLoader.java \
|
gnu/gcj/runtime/BootClassLoader.java \
|
||||||
gnu/gcj/runtime/FileDeleter.java \
|
gnu/gcj/runtime/FileDeleter.java \
|
||||||
gnu/gcj/runtime/FinalizerThread.java \
|
gnu/gcj/runtime/FinalizerThread.java \
|
||||||
|
gnu/gcj/runtime/HelperClassLoader.java \
|
||||||
gnu/gcj/runtime/JNIWeakRef.java \
|
gnu/gcj/runtime/JNIWeakRef.java \
|
||||||
gnu/gcj/runtime/NameFinder.java \
|
gnu/gcj/runtime/NameFinder.java \
|
||||||
gnu/gcj/runtime/PersistentByteMap.java \
|
gnu/gcj/runtime/PersistentByteMap.java \
|
||||||
|
@ -550,6 +550,7 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
|
|||||||
gnu/gcj/runtime/BootClassLoader.java \
|
gnu/gcj/runtime/BootClassLoader.java \
|
||||||
gnu/gcj/runtime/FileDeleter.java \
|
gnu/gcj/runtime/FileDeleter.java \
|
||||||
gnu/gcj/runtime/FinalizerThread.java \
|
gnu/gcj/runtime/FinalizerThread.java \
|
||||||
|
gnu/gcj/runtime/HelperClassLoader.java \
|
||||||
gnu/gcj/runtime/JNIWeakRef.java \
|
gnu/gcj/runtime/JNIWeakRef.java \
|
||||||
gnu/gcj/runtime/NameFinder.java \
|
gnu/gcj/runtime/NameFinder.java \
|
||||||
gnu/gcj/runtime/PersistentByteMap.java \
|
gnu/gcj/runtime/PersistentByteMap.java \
|
||||||
@ -3554,6 +3555,7 @@ am__objects_15 = $(am__objects_9) gnu/classpath/ServiceFactory.lo \
|
|||||||
gnu/gcj/runtime/BootClassLoader.lo \
|
gnu/gcj/runtime/BootClassLoader.lo \
|
||||||
gnu/gcj/runtime/FileDeleter.lo \
|
gnu/gcj/runtime/FileDeleter.lo \
|
||||||
gnu/gcj/runtime/FinalizerThread.lo \
|
gnu/gcj/runtime/FinalizerThread.lo \
|
||||||
|
gnu/gcj/runtime/HelperClassLoader.lo \
|
||||||
gnu/gcj/runtime/JNIWeakRef.lo gnu/gcj/runtime/NameFinder.lo \
|
gnu/gcj/runtime/JNIWeakRef.lo gnu/gcj/runtime/NameFinder.lo \
|
||||||
gnu/gcj/runtime/PersistentByteMap.lo \
|
gnu/gcj/runtime/PersistentByteMap.lo \
|
||||||
gnu/gcj/runtime/SharedLibHelper.lo \
|
gnu/gcj/runtime/SharedLibHelper.lo \
|
||||||
@ -4568,6 +4570,7 @@ AM_CXXFLAGS = \
|
|||||||
-DLIBDIR="\"$(libdir)\"" \
|
-DLIBDIR="\"$(libdir)\"" \
|
||||||
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
|
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
|
||||||
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
|
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
|
||||||
|
-DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
|
||||||
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
|
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
|
||||||
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
|
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
|
||||||
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
|
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
|
||||||
@ -6752,6 +6755,7 @@ gnu/gcj/io/SimpleSHSStream.java \
|
|||||||
gnu/gcj/runtime/BootClassLoader.java \
|
gnu/gcj/runtime/BootClassLoader.java \
|
||||||
gnu/gcj/runtime/FileDeleter.java \
|
gnu/gcj/runtime/FileDeleter.java \
|
||||||
gnu/gcj/runtime/FinalizerThread.java \
|
gnu/gcj/runtime/FinalizerThread.java \
|
||||||
|
gnu/gcj/runtime/HelperClassLoader.java \
|
||||||
gnu/gcj/runtime/JNIWeakRef.java \
|
gnu/gcj/runtime/JNIWeakRef.java \
|
||||||
gnu/gcj/runtime/NameFinder.java \
|
gnu/gcj/runtime/NameFinder.java \
|
||||||
gnu/gcj/runtime/PersistentByteMap.java \
|
gnu/gcj/runtime/PersistentByteMap.java \
|
||||||
@ -9045,6 +9049,8 @@ gnu/gcj/runtime/FileDeleter.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
|||||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
gnu/gcj/runtime/FinalizerThread.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
gnu/gcj/runtime/FinalizerThread.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
gnu/gcj/runtime/HelperClassLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||||
|
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
gnu/gcj/runtime/JNIWeakRef.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
gnu/gcj/runtime/JNIWeakRef.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||||
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
gnu/gcj/runtime/NameFinder.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
gnu/gcj/runtime/NameFinder.lo: gnu/gcj/runtime/$(am__dirstamp) \
|
||||||
@ -14849,6 +14855,8 @@ mostlyclean-compile:
|
|||||||
-rm -f gnu/gcj/runtime/FileDeleter.lo
|
-rm -f gnu/gcj/runtime/FileDeleter.lo
|
||||||
-rm -f gnu/gcj/runtime/FinalizerThread.$(OBJEXT)
|
-rm -f gnu/gcj/runtime/FinalizerThread.$(OBJEXT)
|
||||||
-rm -f gnu/gcj/runtime/FinalizerThread.lo
|
-rm -f gnu/gcj/runtime/FinalizerThread.lo
|
||||||
|
-rm -f gnu/gcj/runtime/HelperClassLoader.$(OBJEXT)
|
||||||
|
-rm -f gnu/gcj/runtime/HelperClassLoader.lo
|
||||||
-rm -f gnu/gcj/runtime/JNIWeakRef.$(OBJEXT)
|
-rm -f gnu/gcj/runtime/JNIWeakRef.$(OBJEXT)
|
||||||
-rm -f gnu/gcj/runtime/JNIWeakRef.lo
|
-rm -f gnu/gcj/runtime/JNIWeakRef.lo
|
||||||
-rm -f gnu/gcj/runtime/NameFinder.$(OBJEXT)
|
-rm -f gnu/gcj/runtime/NameFinder.$(OBJEXT)
|
||||||
@ -19822,6 +19830,7 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/BootClassLoader.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/BootClassLoader.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FileDeleter.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FileDeleter.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FinalizerThread.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FinalizerThread.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/HelperClassLoader.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/JNIWeakRef.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/JNIWeakRef.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/NameFinder.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/NameFinder.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/PersistentByteMap.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/PersistentByteMap.Plo@am__quote@
|
||||||
|
@ -8,14 +8,9 @@ details. */
|
|||||||
|
|
||||||
package gnu.gcj.runtime;
|
package gnu.gcj.runtime;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FilenameFilter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a helper for the bootstrap class loader. It is a
|
* This is a helper for the bootstrap class loader. It is a
|
||||||
@ -24,37 +19,18 @@ import java.util.StringTokenizer;
|
|||||||
* However, it is never called the way that an ordinary ClassLoader is
|
* However, it is never called the way that an ordinary ClassLoader is
|
||||||
* called. For instance, loadClass() is never used.
|
* called. For instance, loadClass() is never used.
|
||||||
*/
|
*/
|
||||||
public final class BootClassLoader extends URLClassLoader
|
public final class BootClassLoader extends HelperClassLoader
|
||||||
{
|
{
|
||||||
BootClassLoader(String libdir)
|
BootClassLoader(String libdir)
|
||||||
{
|
{
|
||||||
super(new URL[0]);
|
addDirectoriesFromProperty("java.endorsed.dirs");
|
||||||
|
addDirectoriesFromProperty("gnu.gcj.runtime.endorsed.dirs");
|
||||||
|
|
||||||
// Add the contents of the endorsed directories.
|
|
||||||
StringTokenizer st
|
|
||||||
= new StringTokenizer (System.getProperty ("java.endorsed.dirs", ""),
|
|
||||||
File.pathSeparator);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (st.hasMoreElements ())
|
// Add core:/ to the end so any resources compiled into this
|
||||||
{
|
// executable may be found.
|
||||||
String dirname = st.nextToken ();
|
addURL(new URL("core", "", -1, "/"));
|
||||||
File dir = new File (dirname);
|
|
||||||
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 (java.net.MalformedURLException x)
|
catch (java.net.MalformedURLException x)
|
||||||
{
|
{
|
||||||
|
@ -10,20 +10,16 @@ details. */
|
|||||||
|
|
||||||
package gnu.gcj.runtime;
|
package gnu.gcj.runtime;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
import java.util.HashSet;
|
||||||
|
|
||||||
// Despite its name, this class is really the extension loader for
|
// Despite its name, this class is really the extension loader for
|
||||||
// libgcj. Class loader bootstrap is a bit tricky, see prims.cc and
|
// libgcj. Class loader bootstrap is a bit tricky, see prims.cc and
|
||||||
// SystemClassLoader for some details.
|
// SystemClassLoader for some details.
|
||||||
public final class VMClassLoader extends URLClassLoader
|
public final class VMClassLoader extends HelperClassLoader
|
||||||
{
|
{
|
||||||
private VMClassLoader ()
|
private VMClassLoader ()
|
||||||
{
|
{
|
||||||
super (new URL[0]);
|
|
||||||
String p
|
String p
|
||||||
= System.getProperty ("gnu.gcj.runtime.VMClassLoader.library_control",
|
= System.getProperty ("gnu.gcj.runtime.VMClassLoader.library_control",
|
||||||
"");
|
"");
|
||||||
@ -39,44 +35,7 @@ public final class VMClassLoader extends URLClassLoader
|
|||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
// Add the contents of the extensions directories.
|
addDirectoriesFromProperty("java.ext.dirs");
|
||||||
StringTokenizer st
|
|
||||||
= new StringTokenizer (System.getProperty ("java.ext.dirs"),
|
|
||||||
File.pathSeparator);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
while (st.hasMoreElements ())
|
|
||||||
{
|
|
||||||
String dirname = st.nextToken ();
|
|
||||||
File dir = new File (dirname);
|
|
||||||
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]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add core:/ to the end so any resources compiled into this
|
|
||||||
// executable may be found.
|
|
||||||
addURL(new URL("core", "", -1, "/"));
|
|
||||||
}
|
|
||||||
catch (java.net.MalformedURLException x)
|
|
||||||
{
|
|
||||||
// This should never happen.
|
|
||||||
throw new RuntimeException(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is overridden to search the internal hash table, which
|
/** This is overridden to search the internal hash table, which
|
||||||
|
@ -528,6 +528,11 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
|
|||||||
// The java extensions directory.
|
// The java extensions directory.
|
||||||
SET ("java.ext.dirs", JAVA_EXT_DIRS);
|
SET ("java.ext.dirs", JAVA_EXT_DIRS);
|
||||||
|
|
||||||
|
// The endorsed directories that libgcj knows about by default.
|
||||||
|
// This is a way to get other jars into the boot class loader
|
||||||
|
// without overriding java.endorsed.dirs.
|
||||||
|
SET ("gnu.gcj.runtime.endorsed.dirs", GCJ_ENDORSED_DIRS);
|
||||||
|
|
||||||
// The path to libgcj's boot classes
|
// The path to libgcj's boot classes
|
||||||
SET ("sun.boot.class.path", BOOT_CLASS_PATH);
|
SET ("sun.boot.class.path", BOOT_CLASS_PATH);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user