Java on HP-UX 11i Frequently Asked Questions

vm_args.minHeapSize = 32000000;
vm_args.maxHeapSize = 96000000;
vm_args.nativeStatckSize = 1000000;
vm_args.javaStackSize = 1000000;
vm_args.disableJIT = JNI_TRUE;
if (ret !=0)
printf("failed to GetDefaultJavaVMInitArgs/n");
//Note: If you have not set and exported the environment variable
//CLASSPATH you may also need to add this:
vm_args.classpath =.:/opt/java/lib/classes.zip:./ssjcls01.zip";
//load and initialize a JVM, return a JNI interface pointer in env
ret = JNI_CreateJavaVM(jvm env vm_args);
For more information and code examples, refer to the JNI chapter of the HP-UX Java
Programmer's Guide.
Q: I downloaded Java and got the error: "Unable to initialize threads -- cannot find class
java/lang/thread". What should I do?
A: For most users, the Java wrapper script will take care of setting the JAVA_HOME
environment variable and will add the appropriate entries to the CLASSPATH so that
the JVM finds the standard API classes.
The PATH environment variable needs to include a path to the Java wrapper script.
People writing applications with non-Java mains may need to worry about the setting
of CLASSPATH and SHLIB_PATH.
For more information, refer to the HP-UX Java Programmer's Guide.
Q: I'm trying to establish a bare socket connection from a client machine to a server
machine on another network through a firewall. How do I do this?
A: You have to use C or C++ routines and communicate with the JVM via JNI calls (Java
calling C or C++). For more information and code examples, refer to the JNI chapter of
the HP-UX Java Programmer's Guide.
Q: When I start swinstall and try to install the depot file, I get the message: "You do
not have the required permissions to perform this SD operation." How can this be, if I
am logged in as root?
A: You could try the following:
1. Kill the swagentd process.
2. Run the following command, and if the file swlock exists, rename the file:
ls /var/adm/sw/products/swlock
3. Kill the swinstall process (if swinstall is running).
4. Restart the swagentd process.
12