|
Glad to hear it was working. Now, if we can find out how to alleviate those other issues. I've had that happen as well. I've used object groups from within Scott Klement's HSSF Service program, but I still, on occasion, have the issue with stuff just hanging around and messing with other stuff. I really don't have any other way of putting since I don't have intimate knowledge of the architecture. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com "chris beck" <cbeck@xxxxxxxxxx om> To Sent by: <rpg400-l@xxxxxxxxxxxx> rpg400-l-bounces@ cc midrange.com Subject Re: Call Java Method from RPG 06/20/2005 01:48 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> It is under /java/demo/ I have my CLASSPATH set to '/java'. Apperently something was hanging around and not getting cleaned up, I just tried logging onto another session and it does work just fine. Thanks, Chris >>> MWalter@xxxxxxxxxxxxxxx 06/20/05 12:38 PM >>> This almost always speaks to a classpath issue. Where is the class demo.MainCall located in the file system? Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com "chris beck" <cbeck@xxxxxxxxxx om> To Sent by: <rpg400-l@xxxxxxxxxxxx> rpg400-l-bounces@ cc midrange.com Subject Call Java Method from RPG 06/20/2005 12:45 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> I am trying to write a RPG program that will call a java method in a class. I am able to call main fine, but when i try to call fred I get a RNX0301 "Java.lang.NoSuchMethodError: fred". Can anyone else see what I am doing wrong? Thanks, Chris H Thread(*SERIALIZE) H Dftactgrp(*NO) H Bnddir('QC2LE') d mainCall$Main PR STATIC d EXTPROC( d *JAVA: d 'demo.MainCall': d 'main') d O CLASS(*JAVA:'java.lang.String') d DIM(2) d CONST d String$new PR O EXTPROC( d *JAVA: d 'java.lang.String': d *CONSTRUCTOR) d CLASS( d *JAVA: d 'java.lang.String') d bytes 50A CONST VARYING d args s O CLASS( d *JAVA: d 'java.lang.String') d DIM(2) *************************************************************** d mainCall$fred PR STATIC d EXTPROC( d *JAVA: d 'demo.MainCall': d 'fred') *************************************************************** D System PR 10I 0 ExtProc('system') D CmdText * Value Options(*String) *************************************************************** /free args(1) = String$new('Test String 1'); args(2) = String$new('Test String 2'); MainCall$main(args); system('dlyjob (2)'); MainCall$fred(); system('dlyjob (2)'); *inlr = *on; ********************************************************************************** package demo; public class MainCall { public static void main(String[] args) { for (int i = 0; i < args.length; i++) { System.out.println("Parameter " + i + " " + args[i]); } } public static void fred() { System.out.println("Fred"); } } ********************************************************************************** ------------------------------------------------- This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, printing, distributing or use of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone or return email and delete the original transmission and its attachments without reading or saving in any manner. The Evangelical Lutheran Good Samaritan Society. --------------------------------------------------------- -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. ------------------------------------------------- This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, printing, distributing or use of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone or return email and delete the original transmission and its attachments without reading or saving in any manner. The Evangelical Lutheran Good Samaritan Society. --------------------------------------------------------- -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.