| Author |
Garbage Collector program does not run
|
tushar panda
Ranch Hand
Joined: Feb 16, 2009
Posts: 133
|
|
when i run the code below given in K&B book , to find memory deallocated it runs perfectly and gives output
but when i write a similar code , given below
i get a error
why so ? only changing class name gives this error ? is CheckGC a predefined class ?
|
Do Right , Fear No Man
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16815
|
|
why so ? only changing class name gives this error ? is CheckGC a predefined class ?
Question. When you changed the name of the class, did you also change the name of the source file, and recompile?
Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16815
|
|
Oh.... did you happen to run it as....
> java garbage.java
instead of ...
> java garbage
Henry
|
 |
 |
|
|
subject: Garbage Collector program does not run
|
|
|