Sponsored Content
Operating Systems HP-UX Problem while using shl_load to load libjvm.so Post 302247300 by d_ccc on Wednesday 15th of October 2008 11:07:34 AM
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);
}

 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
errno(5)							File Formats Manual							  errno(5)

NAME
errno - Returns error condition value SYNOPSIS
#include <errno.h> DESCRIPTION
The errno external variable contains the most recent error condition set by a function. The symbolic values for errno are listed in the intro reference page and in the ERRORS section of the individual reference pages for each function. The exec() functions set errno to a value of 0 (zero) after successful completion. Typically, other functions only set errno to a nonzero value. EXAMPLES
The following program uses the value of errno to determine why the requested file could not be opened. If errno has one of the two tested values, the program prints an appropriate message; otherwise, the program uses the error() function to print out the appropriate message. This program does not have to set errno to a value of 0 (zero) because errno is tested only if the open() function has failed. #include <errno.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #define SLENGTH 80 main() { char filespec[SLENGTH], *eol; int opret; while (TRUE) { printf("Enter file to be checked: "); fgets(filespec, SLENGTH, stdin); if ((eol = strchr(filespec, ' ')) != NULL) { *eol = ''; /* Replace newline with null */ if (*filespec == '') return; /* exit program */ opret = open(filespec,O_RDONLY,0); if (opret > 0) printf("%s: File exists ",filespec); else if (errno == ENOENT) printf("%s: File does not exist ",filespec); else if (errno == ENOTDIR) printf("%s: Prefix in path is not a directory ", filespec); else perror(filespec); } else /* Line entered too long */ printf("Line entered is too long "); } } NOTES
To ensure that your programs are portable, you should not explicitly declare errno to be an extern int in your program. You should rely on the type int declaration in the <errno.h> include file. Full use. SEE ALSO
Functions: intro(2), perror(3), strerror(3) errno(5)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy