× 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.



Hi,

its possible, by using the java reflection APIs, but why don't you use 
java??? It would be more easy to learn java than programming work arounds 
with a mix of rpg and java!!!

Dieter


On Tuesday 08 July 2003 02:05, you wrote:
> > How do I reference built in static final fields in Java objects/classes
> > from RPG?
>
> It's possible to do this using JNI calls, but it's not easy.  Personally,
> I would just write some simple classes that get these fields, and then you
> can just call them when you need them.  Or, if these are just constants
> that'll never change, maybe create a /copy file to define the same
> constants in RPG.
>
> In case you are interested in retrieving them using JNI, here's an excerpt
> from the ILE RPG Programmer's Guide:
>
>     Accessing Fields in Java Classes
>
>     RPG only supports calling Java methods; it does not support accessing
>     Java fields. Normally, fields can be accessed through "get" and
>     "set" methods, but it is also possible to access fields using JNI
>     calls.
>
> It then proceeds to give an example of using the JNI calls to get some
> fields.
>
> I found this in Chapter 11 of the ILE RPG Programmers Guide, which is
> online here:
> http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahgrpgcode.htm
>
> In chapter 11, I went to "RPG and Java" and then "Advanced JNI coding".
> Good Luck...
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
> mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.

-- 
mfG

Dieter Bender


DV-Beratung Dieter Bender
Wetzlarerstr. 25
35435 Wettenberg
Tel. +49 641 9805855
Fax +49 641 9805856
www.bender-dv.de

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.