Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Getting the full Exception or Stack Trace when RPG calls Java

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the full Exception or Stack Trace when RPG calls Java

    I found out about outer$inner when I learned Java. If you look at the .class files created when you do the javac for your outer class, you'll see two class files: outer.class and outer$inner.class. Since the RPG<->Java support uses JNI (Java Native Interface), you might find some useful information in Sun's JNI documentation. They have a nice tutorial: http://www.cogs.susx.ac.uk/local/sup...1.1/index.html But I don't think it mentions the $ thing. In general, if you run into problems using RPG and Java together, you're unlikely to find anything on the web or USENET if you search for RPG. You'll get more hits if you substitute jni for rpg in your searches. I just searched for jni "inner class" in USENET (http://groups.google.com/) and the answer was in the first hit. http://groups.google.com/groups?q=jn...ibm.net&rnum=1

  • #2
    Getting the full Exception or Stack Trace when RPG calls Java

    I've got a RPG pgm that calls Java methods. When one of the methods throws an exception how can I see the full exception (Stack Trace)? The error on the 400 just gives me 30 or so bytes of the exception... I can't see what the possible String is that was sent with the exception. I'm sure that was clear as mud... TIA by the way, I found out something today(from a very patient java guru) that I hadn't been able to find in any manuals concerning calling java from rpg. If you need to access or define an inner class in RPG, you have to place a '$' between the outer and inner class dot notation. D recipType S O CLASS(*JAVA: D 'javax.mail.Message$RecipientType') where RecipientType is an inner class of Message... If anyone knows what manual(s) this is documented in, please tell. Any other rpg/java references would be great to have!

    Comment

    Working...
    X