On Jan 5,  1:22pm, Catalin CLIMOV wrote:
> Subject: Re: finalizer()
> Very strange.
> I tried to run your code and it worked fine with java (it displayed
'finelize'),
> but it didn't work with jre (it finished without displaying anything).
> I use the same jdk on Linux 5.1, kernel 2.0.34.
>
> Catalin CLIMOV.
>
> John Summerfield wrote:
>
> > I have this code:
> > public class  F
> >    {
> >       protected void finalize() throws Throwable
> >          {
> >             System.out.println("finalize");
> >             super.finalize();
> >          }
> >       public static void main(String[] args) throws Throwable
> >          {
> >             F f = new F();
> >             System.runFinalizersOnExit(true);
> >             Runtime.getRuntime().runFinalizersOnExit(true);
> >             f = null;
> >             System.gc();
> >          }
> >    }
> >
> > My documentation leads me to expect that finalize() will be run and produce
> > this output:
> >
> > finalize
> >
> > However, it produces no output.
> >
> > [summer@possum summer]$ java -fullversion
> > java full version "Linux_JDK_1.1.7_v1a_green_threads"
> >
> > I'm running RedHat Linux 5.0, kernel 2.0.36:
> > [summer@possum summer]$ uname -a
> > Linux possum.os2.ami.com.au 2.0.36 #4 Wed Dec 30 20:13:06 WST 1998 i686
unknown
> >
> > --
> > Cheers
> > John Summerfield
> > http://os2.ami.com.au/os2/ for OS/2 support.
> > Configuration, networking, combined IBM ftpsites index.
>
>
>
> --
>  \|/ ____ \|/
>   @~/ Oo \~@
>  /_( \__/ )_\
>     \__U_/
>
>
>
>-- End of excerpt from Catalin CLIMOV


Same result on Solaris2.6 with jdk1.1.6.
Very strange..

Reply via email to