Java Runtime Library

I’m trying to access some java methods from the Runtime lib. So I have

from java.lang import Runtim

If I try this:

mem = Runtime.maxMemory()

I get:

TypeError: maxMemory(): expected 1 args; got 0

According to the java docs, it doesn’t take any arguments. If I try:

mem = Runtime.maxMemory(0)

I get:

TypeError: maxMemory(): self arg can’t be coerced to java.lang.Runtime

This is the same error if I try other methods from Runtime. Any idea what I’m doing wrong. Thanks

Ah, you want to use:

mem = Runtime.getRuntime().maxMemory()

hope that helps, take it easy.