Download Jarrut at sourceforge
Jarrut is a tool that can be used to make developing and debugging Java ME
applications (application using CLDC to be more specific) a bit less of a
pain. Jarrut enables proper stack traces for exceptions, also when running
a MIDlet on a real device
The main features are:
- Proper stack traces for exceptions, also when running on a real device.
It's also possible to log the exceptions to any desired destination.
- Simple deadlock detection (experimental)
- Simple profiling (very early version)
The MIDlet binary classes are processed after compilation to include code
that tracks method execution. This way the stack traces can be logged on
exception situations or whenever needed. The instrumentation is done with a
Java SE tool that should be run after the MIDlet has been compiled. Also a
small run-time library needs to be included in the MIDlet jar package.
Jarrut instrumentation tool is licenced under GPL and the Jarrut runtime
library is licenced under LGPL. Jarrut instrumentation tool uses the ASM
open source Java bytecode manipulation library (http://asm.ow2.org).
USAGE:
- Compile you MIDlet normally (debug information needs to be enabled to
get all the info to the stack traces)
- Run the Jarrut instrumentation tool using Ant or from the command line
- Include the classes in the Jarrut runtime library to the jar package
- preverify and package the classes (the MIDlet can also be obfuscated)
Examples with working Ant build files are included in the download.
NOTES:
- If you are using microlog, it will be detected and used automatically for
printing the stack traces. Otherwise the traces will be printed to
System.out print stream. It's also possible to define a custom callback
method that will be used for the output.
- Compile with debug information enabled and debuglevel=lines,vars,source
(also make sure you don't put spaces between commas)
- Obfuscating the jar is possible and the stack traces will still be
preserved. Just make sure to instrument classes using Jarrut before
obfuscating the jar. Otherwise the stack traces will show the obfuscated
names.
- You need to include the classes in the run-time lib to the MIDlet jar
package.
- Only use Jarrut on debug builds. It can have considerable effects on
application size and performance.
- CLDC 1.1 is currently required.
Download Jarrut at sourceforge