# Java Runtime Library

**URL:** <https://forum.inductiveautomation.com/t/java-runtime-library/5532>\
**Category:** Ignition\
**Created:** [December 5, 2012, 10:38pm UTC](https://forum.inductiveautomation.com/t/java-runtime-library/5532 "2012-12-05T22:38:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [December 5, 2012, 10:38pm UTC](https://forum.inductiveautomation.com/t/java-runtime-library/5532/1 "2012-12-05T22:38:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael.Stofan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.stofan/32/3342_2.png) [@Michael.Stofan](https://forum.inductiveautomation.com/u/Michael.Stofan)\
**Post date:** [December 5, 2012, 10:47pm UTC](https://forum.inductiveautomation.com/t/java-runtime-library/5532/2 "2012-12-05T22:47:35Z")

</div>

Ah, you want to use:

```auto
mem = Runtime.getRuntime().maxMemory()
```

hope that helps, take it easy.
