[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
Do you have CLASSPATH set?
Have you tried using CJAVA-CALL instead of CJAVA-CALLNONVIRTUAL?
[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
No. I thought this is only neccessary when you are calling Cobol from Java. At least the documentation is telling that. How do I have to set the classpath then. Is it in the configuration file for AcuCobol?
I've tried the CJAVA-CALL without success. The status keeps to be same (-6).
Cheers,
chefdecuisine
[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
Note that the Java compiler expects to find the proxies package and its members in an accessible directory. This directory can be a subdirectory of a location listed in the classpath (via command-line option or environment variable), or it can be included in a JAR file (also listed in the classpath). When the compiler finds these ".java" files, it compiles them into classes (with the ".class" extension). These classes must be accessible to the JVM at run time, either by inclusion in the classpath or within a JAR file.
CLASSPATH is an environment variable.
Set CLASSPATH so that it points to the directory where your java archive for CobolTest01 exists.
[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
ACUCOBOL-GT includes three configuration variables for calling Java via the C$JAVA routine.
PRELOAD_JAVA_LIBRARY
Tells the runtime to preload the JVM on startup
JAVA_LIBRARY_NAME
Specifies the name and path of the JVM library to load
JAVA_OPTIONS
Specifies Java command-line options
All three variables are optional. If desired, you include them in your runtime configuration file, just as you would any ACUCOBOL-GT configuration variable. See Appendix H in ACUCOBOL-GT Appendices for details on using these variables.
For Java interoperability, your configuration file may look like this:
PRELOAD_JAVA_LIBRARY=1
JAVA_LIBRARY_NAME=jvm.dll (libjvm.so unix)
JAVA_OPTIONS="-Djava.library.path="c:\\usr\\lib" -Xms128m
-Xmx128m -classpath /java/MyClasses/myclasses.jar"
[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
I've set the matching attributes in my configuration file.
A libjvm.so version 1.5 was available on the server. So I've set
JAVA_LIBRARY_NAME=/opt/java1.5/jre/lib/IA64N/server/libjvm.so
with its full path and
JAVA_OPTIONS="-Djava.library.path="c:\\usr\\lib" -Xms128m -Xmx128m -classpath /s/uniworks522a/stephan.jar"
with the appropriate path that contains my jar with my CobolTest01.class
I ran the test again and the status is still -6.
:confused:
[Migrated content. Thread originally posted on 15 May 2006]
Hi,
I try to access to a very basic "add"- method that is in a class called CobolTest01. I am using the "C$JAVA" command to create it with the op-code CJAVA-NEW and it initializes a handle. But when I try to use its method with CJAVA-CALLNONVIRTUAL I receive a -6 status CJAVA-JAVALIBNOTLOADED error and nothing is done.
Does anybody know why it is telling me that message?
Cheers,
chefdecuisine
I would contact Acucorp technical support