OS2 World.Com Forum

Subject  :  Memory Debugger for Java Applications
Author  :  anu
Date  :  10 Oct, 2006 on 13:24
Hi all..

Am a java developer in OS/2 platform. Currently we are using Innotek JDK 1.4.2 which is the latest OS/2 JVM available in the market.My application is using swings widely and we are also facing Out of memory issues.

So am looking for a good debugging tool which can help me solve out of memories. I have used tools like Theseus but that doesn't help much for java applications .

Can any one point me out to a good java memory debugger in OS/2.

Thanks in advance ..

Subject  :  Re:Memory Debugger for Java Applications
Author  :  El Vato
Date  :  11 Oct, 2006 on 08:06
Would a heap analyzer be appropriate for your purposes?

If so, you may want to point your browser to < http://www.alphaworks.ibm.com/tech/heapanalyzer >

It is packaged in a zip file and, according to the documentation, you can use it in Java 141 and up versions --multiplatform environment-- to find possible Java heap leaks.

I tested it under Warp 4, fixpak 15, using the Golden Code Development < http://www.goldencode.com/company/software/ >environment: Java™ 2 Runtime Environment, Standard Edition (1.4.1_06-gcd-b32-2003112 and (apparently) it rocks.

< http://www.chingonazo.com/OS2IBMHeap.JPG >

Please, note that I did not test it under Innotek's port of Java since being a hack from the WinXX version, may not be as stable as the native one from Golden Code.

Additionally, I did not pass any parameters to fire up the utility --your Java documentation and Heap utility instructions will shed some light into your particular situation.

Hope the info is useful.

Subject  :  Re:Memory Debugger for Java Applications
Author  :  El Vato
Date  :  13 Oct, 2006 on 12:30
...on the other hand, you may want to point your browser to: < http://prdownloads.sourceforge.net/jswat/jswat-2.39.zip?use_mirror=easynews > and download the zipped file from your closest mirror.

You will get GPL version of a front end debugger that uses your tools.jar file to provide the debugging functionality.

This is the older version but it works with Java 1.41 and up ( possibly also with Java 1.4[x<1] ); the newer version requires Java 1.5.

My environment variables, the first set in Config.sys, the other two(2) in a CMD file to set on the fly (where x is your root directory and y is the directory where you unzipped the JSwat front end):

SET GCD_JAVA_HOME=X:\java141\jre

sets Golden Code Development home environment.
And create a file, say x:\os2\myJSwat.cmd

SET JSWAT_HOME=y:\jswat-2.39

Each SET statement in a single line --as a Java programmer I knew you were aware of it-- so please bear with me in case I am not so clear. Hence in the above *cmd the second SET has to be in a single line preceding CLASSPATH=...

Note that having the older (Java 1.1.8) CLASSPATH environment in your Config.sys file may introduce problems --hence, I do not have it set.

Additionally, references to X:\java11\dll in your Config.sys LIBPATH may introduce errors --consequently, I do not have a reference to it.

Finally, I started the debugging front end --from anywhere in my file system-- like this.

java com.bluemarsh.jswat.Main

And this is what appeared:

< http://www.chingonazo.com/OS2IBMJSwat.JPG >
< http://www.chingonazo.com/OS2IBMJSwat1.JPG >

As before, I did not include any switches --those are in the exclusive domain of the Java developer and may vary according to how s/he builds her/his test applications.

Good luck!

Powered by UltraBoard 2000 <www.ub2k.com>