|
Thanks Scott/Larry,
I get the same problem when run the command from qsh as well. I have
set my CLASSPATH in the envvar. But when I call any java method I get an
error.
$
> cd ..
$
> cd ..
$
> cd junk
$
> java com.Ostermiller.util.Browser.displayURL("http://www.yahoo.com")
qsh: 001-0050 Syntax error on line 4: token "(" not expected.
$
Is there a setup(s) I am missing? We just updated to v5r3.
Thanks,
Sudha
Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax
-----Original Message-----
From: Larry [mailto:Larry_Ducie@xxxxxxxxxxx]
Sent: Friday, December 10, 2004 5:59 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: RPG - Java Call
Hi Sudha,
<snip>
in rpg,
D getTestOBJ PR O ExtProc(*JAVA:
D 'com.sud.test.TestURL'
D *CONSTRUCTOR)
Added the string to the call
* java method
D OpenConn PR O Class(*JAVA:'java.lang.String')
D ExtProc(*JAVA:
d 'com.sud.test.TestURL':
d 'urlOpenConnection')
d iUrl like(sUrl)
Define TestURL Object:
D testURL S O Class(*JAVA:'com.sud.test.TestURL)
Call constructor as:
eval testURL = getTestURL()
Call method as:
eval srtn = urlOpenConn(testURL:sUrl)
and now I get error in constructor.
Cause . . . . . : RPG procedure CALLCHECK3 in program
DSRAMANUJA/CALCHECK3
received Java exception "java.lang.NoClassDefFoundError:
com/sud/test/TestURL" when calling method "<init>" with signature
"()V" in
class "com.sud.test.TestURL".
</snip>
Firstly, You have a constructor prototype defined with the name
getTestOBJ,
but you are using a call to the method get TestURL().
The constructor should be called using:
eval testURL = getTestOBJ()
Secondly, your open connection method call is incorrect. The prototype
name
is OpenConn but you use urlOpenConn(testURL:sUrl).
The method call should be:
eval srtn = OpenConn(testURL:sUrl)
Try that and see how it goes.
Cheers
Larry
--
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-2025 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.