I think you need a LIBPATH environment variable to point to it

I got the following from the Enterprise COBOL manual:

http://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/ref/rpooo10e.htm
http://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/tasks/tpooo08.htm

//RUN EXEC PGM=CALLJAVA,REGION=0M,COND=(4,LT),
// PARM='ENVAR("_CEE_ENVFILE=/u/userid/javaenv") POSIX(ON)/'
//STEPLIB DD DISP=SHR,DSN=JIG.BASE710.LOAD
// DD DISP=SHR,DSN=CEE.SCEERUN
// DD DISP=SHR,DSN=CEE.SCEERUN2

/u/userid/javaenv would be a Unix file with something like the following:
PATH=/bin:/u/Java6_31/J6.0/bin
LIBPATH=/lib:/usr/lib:/u/Java6_31/J6.0/bin:/u/Java6_31/J6.0/bin/j9vm
CLASSPATH=/u/userid/[something]

Note that I added SCEERUN2 to your STEPLIB.  Not sure if it's necessary, but 
its in the example.
Looks like you may also need to have DD's named JAVAIN, JAVAOUT and JAVAERR, as 
detailed in the second link above.

> Date: Wed, 30 Mar 2016 16:54:46 -0500
> From: 0000004dc9e91b6d-dmarc-requ...@listserv.ua.edu
> Subject: Running an MVS executable using a .so library
> To: IBM-MAIN@LISTSERV.UA.EDU
> 
> I am writing a C program to invoke the JVM to call an existing JNI package.  
> I have the program compiled and linked but I am having trouble getting 
> libjvm.so loaded at run time.
> 
> Is this the right STEPLIB?  ISTR that mixing MVS and USS files on a DD 
> allocation is not allowed but I'm not sure how else to do this?
> 
> //RUN      EXEC PGM=CALLJAVA,REGION=0M,COND=(4,LT),  
> //    PARM='POSIX(ON)/' 
> //STEPLIB  DD DISP=SHR,DSN=JIG.BASE710.LOAD          
> //         DD DISP=SHR,DSN=CEE.SCEERUN               
> //         DD  PATH='/u/Java6_31/J6.0/bin/j9vm/',    
> //           PATHDISP=(KEEP,KEEP)                    
> //SYSTSPRT DD SYSOUT=*                               
> //SYSPRINT DD SYSOUT=*                               
> //SYSOUT   DD SYSOUT=*                               
> //STDERR   DD SYSOUT=*                               
> 
> CEE3501S The module libjvm.so was not found. 
> 
> Also I'm not sure if the ending slash is necessary.  I get the same result 
> whether it's there or not.  Is there a run time option that affects this?
> 
> Janet
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to