× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 8/26/2015 9:40 AM, Justin Taylor wrote:
I do a little bit of Java. I've always just used a text editor and compiled using QSH. I'm now trying to use Eclipse instead. It insists on a package declaration, which I've never used. I created a super simple Java program (with no package) and an RPG program to call it. That worked of course, so I rebuilt the Java program with a package declared. I can't get that call to complete. I assume the issue is in my D-spec, but I don't know what.

Here's the original, no package, D-spec:
Dcl-pr testHello extProc(*java :'SayHello' :'testIt')
static
;
End-pr;

Here's the error:
Java exception "java.lang.NoClassDefFoundError: SayHello (wrong name:
com/test/SayHello)" when calling method "testIt" with signature "()V"
in class "SayHello".

I tried just adding the package name to the class in the D-spec, but that didn't work.


How did you add the package name?

Try extproc(*java : 'com.test.SayHello' : 'testIt')

http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasc/callmethown.htm


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.