public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1145: static linking yields circularity in Class.forName
@ 2000-12-20 12:09 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2000-12-20 12:09 UTC (permalink / raw)
  To: java-gnats

>Number:         1145
>Category:       libgcj
>Synopsis:       static linking yields circularity in Class.forName
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    java-hacker
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:06:35 PST 2000
>Closed-Date:    
>Last-Modified:  Mon Jan 17 14:40:00 PST 2000
>Originator:     Tom Tromey
>Release:        current cvs
>Organization:
>Environment:

>Description:
With the addition of dynamic loading for classes
(and uncommenting of some classloader code), statically
linked gcj applications which use Class.forName will
encounter circularity problems.

The basic problem is that the default ClassLoader is
a URL ClassLoader, which itself uses Class.forName to
find the correct protocol handler.  Since forName tries
to create the system ClassLoader if it doesn't already
exist, and since with static linking the "file" URL
handler won't be linked in automatically (since nothing
explicitly references it), circularity results.

A workaround is to explicitly require the file URL
handler to be linked in (eg, using -u)
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR libgcj/136

Responsible-Changed-From-To: apbianco->java-hacker
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Jan 17 14:34:26 2000
Responsible-Changed-Why:
    I mis-categorized this when I submitted it.

From: tromey@cygnus.com
To: apbianco@cygnus.com, green@cygnus.com, java-gnats@sourceware.cygnus.com,
  tromey@cygnus.com
Cc:  
Subject: Re: libgcj/136
Date: 17 Jan 2000 22:34:26 -0000

 Synopsis: static linking yields circularity in Class.forName
 
 Responsible-Changed-From-To: apbianco->java-hacker
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Mon Jan 17 14:34:26 2000
 Responsible-Changed-Why:
     I mis-categorized this when I submitted it.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=136&database=java
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:09 libgcj/1145: static linking yields circularity in Class.forName Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).