×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Have you included the folder that holds the package folder in your
classpath at run time?
On 26 Aug 2015 15:57, "Justin Taylor" <JUSTIN@xxxxxxxxxxxxx> 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.
--
This is the RPG programming on the IBM i (AS/400 and 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 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-2026 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.