× 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 1:29 PM, Justin Taylor wrote:
I tried just like that. It gave a slightly different error though:

Java exception "java.lang.NoClassDefFoundError: com.test.SayHello" when
calling method "testIt" with signature "()V" in class
"com.test.SayHello".

Far and away, CLASSPATH is the hardest thing to get right for newcomers.

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 a lifelong RPG programmer, I'm very comfortable with the notion of a
source member stored in a source PF stored in a library and being able
to qualify the lot on a CRTBNDRPG command.

The Java 'equivalent' is to use Notepad to edit one .java file and then
use javac to create the .class file. I started there and it looks like
you did too.

Normal Java development isn't like that at all. Normal Java development
requires that you store the .java file(s) in a very specifically named
hierarchy of directories. That hierarchy exactly mirrors the package
name. Using Eclipse, one would typically use the wizards to create a
package, class, and method. If you retrofitted an existing class, you
probably didn't follow the implicit rules for how to store the thing.
It seems crazy until you've done it a few times, and then it becomes
just one of those things you forget about because the IDE handles it for
you.

As an example, I have a Java class called ConvertDToFreeAction. I
created it with Eclipse (to extend RDi). It's stored in
../src/com/kc2hiz/lpexextensions/ConvertDToFreeAction.java The package
statement in the .java file is 'package com.kc2hiz.lpexextensions;'

Hope this helps, and isn't too far off topic.


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.