Monday, February 10, 2014

Java launcher debug

If you ever want to set your development environment so that java utilities should print some debug information you can use _JAVA_LAUNCHER_DEBUG. Note that this environment variable’s value is not relevant, as long as its set to something. So, if you want to disable debugging you have to unset it. Following is an example with javac and java

Compile a java program

Note the details below starting from the launcher state variables (e.g. full java version), arguments to java, the config values read from jvm.cfg, path of libjvm.so, and JavaJVM arguments. These are very handy when debugging a build.

Run the java program

Similary, we can see all the above when invoking a java program.

Java program used above