|
Hello,
I have a Java method that lists files from a given directory on my
local AS400 and puts them on an FTP server.
This works ok when I call the method from an RPG IV module using the
language's built in support (extproc(*JAVA) etc).
When I call the method via JNI it dies on the first JTOpen statement:
System.out.println(ifsdir); // this input parm is printed ok when
called from both RPG IV and JNI
IFSJavaFile dir = new IFSJavaFile(new AS400("mybox"), ifsdir);
System.out.println("made it here"); // only call from RPG IV makes it here
I've tested supplying user and password too to the AS400 constructor,
same thing.
I have also verified that the input string is ok. I don't know what
CCSID RPG IV is using when it's transforming an EBCDIC string into a
java.lang.String object but on the JNI side I've converted the input
strings to both CCSID 1208 and 819 before calling NewStringUTF() with
the same result.
The classpath is set in the calling program and is the same from both
RPG IV and JNI.
So, are there any special considerations to be aware of when using
JTOpen classes from JNI? Very grateful for suggestions!
Best wishes
Erik
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.