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



LCEscario@xxxxxxxxxxxx wrote:
> 
> I just want to know if its possible to call a Java program from my V4R4 AS400 
> System.
> 
> I'm reading a document here and it says that Java Native Interface (JNI) was 
> introduced in OS/400 V5R1. It mentions "With V5R1 came the introduction of 
> the object data type". This allows us to create (and then eventually call) a 
> Java program by doing something like
> 
>         D SUM           S               O       
> Class(*JAVA:'java.math.BigDecimal')
> 
> So how about V4R4? Does that mean PRG programs in V4R4 have no concepts of 
> Java Objects? =O <gasp>
> 

Java Native Interface (JNI) was not introduced in V5R1; it is a basic
part of Java, not something specific to iSeries or RPG.

What happened in V5R1 was easier RPG access to JNI.  Prior to V5R1,
indeed RPG programs had no concept of Java Objects.  You had to do all
the JNI coding yourself.  (I don't know if anyone actually did any
serious JNI coding using RPG prior to V5R1.)

It is really really nasty to do JNI coding in RPG without the
EXTPROC(*JAVA) support.  It's bad enough in C, but much worse in RPG; if
you really need to do this in V4R4, you should probably use C to do the
JNI and call your C functions from RPG.

If you just want to call a Java program that has a main method, you can
use the RUNJVA command.  If you want to get results back, use a data
queue.  (This is a good way to communicate with Java even after V5R1.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.