我正在尝试运行一个使用 java 方法的 RPGLE 程序。我正在通过 FTP 将 java 代码(xxxx.java 文件)从我的系统(Windows XP)传输到 AS/400 IFS 目录。将其传输到 IFS 后,文件 CCSID 显示为 819。
我在 QSH 中编译 .java 文件,没有显示错误。但是会生成两个类文件。即
Mailer.java
→Mailer.class
和Mailer$1.class
但是当我调用我的 RPGLE 程序时,会显示一个 java 异常......
Java exception received when calling Java method (C G D F)...
Application error. RNX0301 unmonitored by MAILERDEMO at statement 000000500
Mailer.java
当我通过按选项 5 在 IFS 中看到该文件时,像{
, }
, [
, ]
, !
,/
等\
符号将更改为其他一些符号。
所以请给我一些解决方案,这样我就可以运行这个程序。如何在不将字符更改为不同字符的情况下将 .java 文件传输到 IFS?
这里有一些细节......
系统 CCSID 值 - 819
工作 CCSID - 273
我在 IFS 目录中的 Java 源代码:
// Load Properties File
if (is |= null) ä
try ä
properties = new Properties();
properties.load(is);
ü
catch (Exception e) ä
System.err.println("Error " + "Ö"" + e.getLocalizedMessage()
+ "Ö"" + " loading AS/400 Connection Properties.");
throw new RuntimeException(e);
ü
ü
// Assume properties passed as system properties
else ä
properties = System.getProperties();
ü
显示运行 RPGLE 程序的 Java 异常:
Message ID . . . . . . : RNQ0301 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 12/30/10 Time sent . . . . . . : 11:31:57
Message . . . . : Java exception received when calling Java method (C G D
F).
Cause . . . . . : RPG procedure MAILERDEMO in program SAHOON1/MAILERDEMO
received Java exception "java.lang.NoSuchMethodError: sendSimpleMail" when
calling method "sendSimpleMail" with signature
"(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)L
java.lang.String;" in class "demo.Mailer".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Possible choices for replying to message . . . . . . . . . . . . . . . :
D -- Obtain RPG formatted dump.
More...