Java on HP-UX 11i Frequently Asked Questions

Q: Are gdb's capabilities for debugging Java documented anywhere?
A: You could start with the "Debugging a native JNI library with Java™ 2 HotSpot VM
under gdb" section of the HP-UX Java Programmer's Guide. Also, stack unwinding in
the Java code is available, so you can do a backtrace through the native code stack
frames, interpreter code stack frames, and runtime compiled code stack frames. To use
this new feature, you will need the latest version of gdb available from www.hp.com/
go/wdb, plus the 1.3.1.02 or later JVM.
Q: I have set java -Djava.rmi.server.logCalls=true, and also the system
property java.rmi.serever.logCalls to true, and I do not see the log files on the
machine.
A: The logs are sent to standard error. If you have stderr redirected, you need to look
there. Also, both options are equivalent, so you need to use either one of the options,
but not both.
Q: I have been unsuccessful in getting my shared library to load. I discovered using
"ldd" that there were numerous unsolved symbols in the Java library. Running ldd on
libjawt.sl indicates unresolved symbols. The symbol entry points appear to be located
in libmawt.sl but this library is not linked with libjawt.sl
A: The library libmawt.sl is loaded using
java.lang.ClassLoader.loadLibrary() during runtime, which resolves the
symbols.
Q: Our application is leaking threads. I notice that when I tune up maxdsize from the
default 64MB to 1GB, the thread issue disappears. Is this possible?
A: If the maxdsize limit is being reached, then this can cause trouble creating new
threads. If a thread creation fails it is reported back to the application as an
OutOfMemoryError, usually as a result of a call to Thread.start().
Q: I can load a library from Java using LoadsLibrary, but when my Java class is initiated
from a C++ main (nonjavacallingjava), I receive an error:
Q: I can load a library from Java using LoadsLibrary, but when my Java class is initiated
from a C++ main (nonjavacallingjava), I receive an error:
shl_load failed for: ./libftjss01.sl,
[errno 2: No such file or directory] /usr/lib/dld.sl:
Call to mmap() failed - TEXT ./libftjss01.sl
A: Ensure that the SHLIB_PATH of the main executable is enabled. Also ensure that
the C++ main initializes some Java properties (like mx) as follows, for example:
//Get the default initialization args and set the class path
jint ret = JNI_GetDefaultJavaVM InitArgs(vm_args);
vm.args.version = 0x00010001:
Troubleshooting questions 11