Problem while using shl_load to load libjvm.so


 
Thread Tools Search this Thread
Operating Systems HP-UX Problem while using shl_load to load libjvm.so
# 1  
Old 10-15-2008
Problem while using shl_load to load libjvm.so

Hi,

I'm trying to load libjvm.so in Hp-ux IPF using shl_load. But always the function fails saying invalid argument.
Please let me know if anything else has to be done.

Here is a sample that i've used.

Code:
#include <stdio.h>
 #include <dlfcn.h>
#include <stdlib.h>
#include <dl.h>
#include <errno.h>
static const char *szPath = "/opt/java1.5/jre/lib/IA64W/server/libjvm.so";
main()
{
void *g_handle_open = NULL;
char p[] = "libjvm.so";
g_handle_open = shl_load(szPath,BIND_DEFERRED,0);
perror("");
printf("errno is %i\n", errno);
printf("%d",g_handle_open);
}

# 2  
Old 10-15-2008
This works on hpux 11.23:
Code:
#include <stdio.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <dl.h>
#include <errno.h>
const char *szPath = "/lib/libwrap.sl";
int main(void)
{
	shl_t g_handle_open;
	g_handle_open = shl_load(szPath, BIND_DEFERRED, 0L);
	if (g_handle_open==NULL)
	{
                 printf("errno is %i\n", errno);
	    perror("");
	    exit(1);
	}
	return 0;
}

check that the library exists exactly as you spelled it, the library does not have internal thread local storage - which for java is possible.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

VPS has load 200, httpd load no activity, netstat nothing

Hello, on my hostserver i see one VPS of mine got load of 200.00 and netstat nothing (not a single blank line on netstat command) after some time, netstat started showing connections, but i see no excessive IP connections. tail -f /var/log/httpd/access_log shows no activity /var/log/messages ;... (1 Reply)
Discussion started by: postcd
1 Replies

2. UNIX for Dummies Questions & Answers

libjvm.so missing?

Hi I get this error message. Error: failed /usr/openv/java/jre/lib/i386/client/libjvm.so, because libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory I tried doing the yum install libstdc but it didn't find any thing. Any of you know how to install this on... (2 Replies)
Discussion started by: samnyc
2 Replies

3. HP-UX

shl_load fails

Hi, I have written a simple program of 2 lines in C to load a library using SHL_LOAD. It fails with error "/usr/lib/hpux32/dld.so: Unable to find library 'xyz.sl'. Load failure for library , ERRNO = 2" Shlib_PATH,LD_LIBRARY_PATH,PATH,LD_PRELOAD are set correctly and library exists on the... (0 Replies)
Discussion started by: ashwinichavan
0 Replies

4. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

5. HP-UX

Load Tape

Hi all, Is there a way that I can load an Ultrium tape located in the library magazine into a tape device via the command line. Thanks Ryan (3 Replies)
Discussion started by: macgre_r
3 Replies

6. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies

7. UNIX for Advanced & Expert Users

load average

we have an unix system which has load average normally about 20. but while i am running a particular unix batch which performs heavy operations on filesystem and database average load reduces to 15. how can we explain this situation? while running that batch idle cpu time is about %60-65... (0 Replies)
Discussion started by: gfhgfnhhn
0 Replies

8. UNIX for Dummies Questions & Answers

boot loader problem - can't load linux

Hi i have both Linux and Windows XP on my PC. i used to use grub as a boot loader and everything was perfect, until i reinstalled Windows. apparently, Windows installer installed its own bootloader, that doesn't recognize Linux. i tried using a tool called GrubInstaller for Windows, and now... (4 Replies)
Discussion started by: shx2
4 Replies
Login or Register to Ask a Question