Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Debugging Java from RPG JNI

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

  • #31
    Debugging Java from RPG JNI

    oh, and here I thought it was news. Thanks for the info, Alex. It apparently failed the smell test... rd

    Comment


    • #32
      Debugging Java from RPG JNI

      Nothing gets comp.lang'rs all tore up like an internal memo. And your take on it is pretty much valid, Alex. There are problems with Java development, but they're pretty much the same problems any living software entity has, from Linux to RPG to sendmail to DOOM. Bugs get prioritized poorly, software gets bloated. No! Really?
      >snicker<

      Comment


      • #33
        Debugging Java from RPG JNI

        Alex Garrison wrote: > > Barbara, > > I also am confused on this. Can you point me to any IBM iseries docs that > describe the jvm behavior in v5r2? > Alex, see the V5R2 Memo to Users, here: http://publib.boulder.ibm.com/iserie...info/rzaq9.pdf. Joe Pluta already posted the relevant bits in this thread - his subject was "One JVM at a time, not one forever?".

        Comment


        • #34
          Debugging Java from RPG JNI

          The documentation in the reference quoted by Joe is just not clear or comprehensive enough to answer the questions. Of course I read the "memo to users", but the three paragraphs on the jvm really just bring up more questions than it answers. Consequently I was hoping IBM had better documentation that spelled out the jvm behavior more clearly. For example: "Prior to V5R2, it would be possible for the JNI_GetCreatedJavaVMs function to return more than one Java virtual machine in its list of Java virtual machines. In V5R2, the JNI_GetCreatedJavaVMs returns at most one Java virtual machine." Are we talking about one JVM for the whole system, or one per job? If two people signon and call JNI_GetCreatedJavaVMs, will they be running in the same JVM? If so, then I have only one JVM per system -- not good for many reasons (need to run multiple jdks, desire to have websphere run in its own jvm so it cant be affected by anything else going on in other jobs, multiple class loaders.....). If each job can get their own JVM (but only one per job), what happens when the jvm for one user blows up? Do I have to abort the whole job? IPL the box? Put another quarter in the slot? If we do get one jvm per job, what happens when that job ends? Does the given jvm end? If not, what happens to the heap? I can easily fire up Java jobs that take 60MB of heap. The jobs end, is the heap released to the memory pool? Does anyone out there know of some IBM docs detailing jvm behavior in v5r2? Anything that maybe got handed out at COMMON? Alex Garrison

          Comment


          • #35
            Debugging Java from RPG JNI

            Hello all, I keep getting myself into these corners where I don't see a easyway out. I'm trying to debug a Java program I wrote. The problem is I wrappered this Java program with an RPG JNI program. (In other words I'm using the new Java support for RPG to call the Java from RPG.) The RPG program is complimented with a good ol' command definition object to disguise it as one of our ol' fashioned home-baked CL utilities. It was working for quite some time now until I decided to muck with it not remembering where I'd left off last time. Now it's time to debug and I'm stuck! I used the eclipse workbench to create the Java program. I threw the .class files in a .jar and shipped it to the IFS. I put it in the classpath and viola! Instant RPG access via the new support. Only thing is the ol' ILE debugger doesn't seem to be able to step into the source. I then tried running just the Java program from the command line with RUNJVA and a *Debug option. "Source file not available..." says the ol' green screen debugger. "Well why are you using that old green screen stuff for debugging?" Good question. The skinny is I don't have the full WSDc toolset from IBM even as we are on V5R1. (We never ordered the disks.) I would ask management to order them for me but you see, that's another story. I'm not even supposed to be coding Java here! (It's the forbidden language like swear words in church.) It'll probably take another six months to a year before I get the chance to play on the new WSDc stuff. So I got the next best thing. I downloaded eclipse from the net since it's free and went to work on that. My situation in summary (minus all the ramblings): I have the Eclipse open source IDE (...and incidentally the Websphere Development Tools disks offered prior to the Eclipse integration.) I have V5R1 and a pretty cool RPG program that uses the new stuff to call the Java program. I have a bug somewhere in my Java (probably due to the fact that I'm stuck on JDK1.2.2 and the APIs I'm using depend on JDK1.3.1+) I have JDK 1.4.1 installed on my Win2K desktop for development (...also the likely suspect of issues since our '400 is stuck on JDK1.2.2) I have limited patience for things which I have no control over and am reaching my boiling point. What are my options? Should I downgrade my development client to JDK1.3.1 or lower? I don't want to move backwards in technology. Should I install the older Websphere devlopment stuff w/ VAJ? I'm not familiar with VAJ and I'd hate to waste time with another outdated bloated IDE. (I've been searching Java IDEs for the longest and finally found my true love in Eclipse.) Should I port the danged source file to the IFS, compile it, and hack my system classpath once again to get things working? (All these steps just feel unnecessary but it would probably take less time than writing this discussion.) What to do? Regards, Cliff (Probably my last post for the year 2K2)

            Comment


            • #36
              Debugging Java from RPG JNI

              Haven't tested it yet but I'm getting there. This was provided compliments of Barbara Morris on the other forum.
              Code

              Comment


              • #37
                Debugging Java from RPG JNI

                Alex Garrison wrote: > > The documentation in the reference quoted by Joe is just not clear or > comprehensive enough to answer the questions. Of course I read the "memo to > users", but the three paragraphs on the jvm really just bring up more > questions than it answers. Consequently I was hoping IBM had better > documentation that spelled out the jvm behavior more clearly. > ... snip some good questions > Does anyone out there know of some IBM docs detailing jvm behavior in v5r2? > Anything that maybe got handed out at COMMON? > Alex, if the answers to your questions aren't readily available in the Info Center, they should be. You should do a Feedback from the Info Center - it's the stubby pencil in the top right. To answer your main question, it's one JVM per job. Using the RUNJVA command or doing a java command from QSH doesn't count - those start up separate jobs.

                Comment

                Working...
                X