On Tue, 5 Jan 1999, Catalin CLIMOV wrote:

> 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.

I thought this was it as I use jre (because it has "-cp"). however,
[summer@possum data]$ jikes -d ~/Classes/ F.java && jre F
[summer@possum data]$ jikes -d ~/Classes/ F.java && jre F
[summer@possum data]$ jikes -d ~/Classes/ F.java && jre F
[summer@possum data]$ pine [EMAIL PROTECTED]
Pine finished
[summer@possum data]$ java F
[summer@possum data]$ java  -classpath ~/classes:$CLASSPATH F
[summer@possum data]$ 

Someone mentioned offline (please, all, keep discussion ON the list) that
it's possible to force garbage collection. My code has the necessary
statements to do that (two versions that I found).



> 
> 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_/
> 
> 
> 

-- 
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.

Reply via email to