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



Thanks to all!  I changed the Java to return a Byte array instead of a
String and it all worked great.

I have to say that I learn something new every time I delve into Java.  And
I also feel, again, that IBM didn't do AS/400 programmers any favor by
hiding the complexity of the nitty gritty of programming behind so much in
RPG.  For example,  a  CHAIN in RPG is easy.   Setting up an input stream,
reading bytes of data from a file, etc...piece by piece, the way you have to
do it in other languages such as Java, is so much more complex by
comparison. AS/400 programmers have not had to deal with that complexity,
they simply execute a CHAIN.  And because of that, when they want to move
to/try a new language, there's a tremendous learning curve.  It would have
been easier to learn it all from the beginning.

Ah well....if it was easy, any one could do it. :-)

Thanks again!

Shannon O'Donnell


----- Original Message -----
From: "Mark Phippard" <MarkP@xxxxxxxxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400"
<java400-l@xxxxxxxxxxxx>
Sent: Wednesday, July 09, 2003 6:37 PM
Subject: RE: Calling Java from RPG - CLASSPATH Problem?


>
> Based on what Paul said, and your example, I would say the problem is that
> your prototype was defining a return variable as 2000 A, which Java
> interprets as a Byte[] array.  You either need to change your method to
> return a Byte array, or you need to change the prototype to be returning a
> Java String object.  You then will need to call a method on that object to
> get it into an RPG character variable.  Probably getBytes().
>
> Mark
>
>
> _______________________________________________
> 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.
>
>
>
>



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.