geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trygve Hardersen" <try...@hardersen.net>
Subject Re: Monitoring Memory Usage
Date Wed, 13 Aug 2008 16:42:39 GMT
Sorry, it's java.lang.Runtime, no import needed :)

See http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html

Trygve

2008/8/13 Peter L. Berghold <peter@berghold.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Trygve Hardersen wrote:
> > What about:
> >
> > Runtime rt = Runtime.getRuntime();
> > long free = rt.maxMemory() - (rt.totalMemory - rt.freeMemory());
> >
>
> What are you importing to get the Runtime class?
>
>
>
> - --
>
> Peter L. Berghold     http://www.berghold.net   peter@berghold.net
> Unix Professional     Dog Agility Fan   Crazed Cook
> "Those who fail to learn from history are condemned to repeat it."
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIow33UM9/01RIhaARAtyzAJ9zGb4maonysgwtbLwlgAgmQknOQwCfQ0Fk
> +vgHwDumGQ07GnUuSaiKs/0=
> =SvxM
> -----END PGP SIGNATURE-----
>

Mime
View raw message