Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Unable to create java virtual machine on V7R1

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

  • Unable to create java virtual machine on V7R1

    We have been using the techniques from the book "Advanced Integrated RPG" to generate Excel spreadsheets from RPG since June of 2010, running under OS V5R4. We installed a new box in December, running OS V7R1, and I have not been able to figure out how to get the Excel-from-RPG processing to work. I have recreated all the modules and service programs associated with this process, using *TERASPACE on the STGMDL (store model) parameter. I have been testing the "Hello World" application, which does not use the Excel processing, and have been unable to get past the "Unable to create java virtual machine" message. I know that the call to JNI_CreateJavaVM is returning a value of -3, which I believe means JNI version error. I can run the HELLO application via QSHELL, which returns everything correctly, so I believe all products are installed as they should be. Has anyone else successfully run this processing on V7R1?

  • #2
    Unable to create java virtual machine on V7R1

    Hello LarJansen,

    I'm glad to hear you've been using AIR for a few years to create your PDFs.

    AIR was written for the V5R4 system for backward compatibility, but the JVM has changed so now it needs to support forward compatibility

    I could see this being a common question so I posted some code on my site, which you can find here:
    http://www.code-gorilla.com/content/...vm-beyond-v5r4

    Let me know if this fixes your problem.

    Have a great day!
    Tom

    Comment


    • #3
      FYI: The code posted there seems to have some issues... missing characters, etc. Just wanted to mention it in case you would want to go in and fix it up a bit so that others with this same issue can use it.

      Comment


      • #4
        Thanks for reviewing the code Viking and thanks for identifying the characters LarJansen. Those HTML Special Characters got me. I've corrected the page and also provided a download link to grab the straight text. I also put a link to download the version of iText that is referred to in the book.

        Have a great day!
        Tom

        Comment


        • #5
          I had trouble starting JVM from RPG on V7R1, even using the new version of the code (based on the idea of RPG starting the JVM itself). I was gettin "Unable to create java virtual machine" message. Based on what I've found on the web I tried adding JAVA_HOME environment variable and that seems to solve the problem (note: you may prefer to set the JAVA_HOME to a diferent value than in the example below).

          ADDENVVAR ENVVAR(JAVA_HOME)
          VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit')

          Resources I used to find the solutions that may be useful to someone else having problems starting JVM from RPG.
          "Configuring the Java JDK Version to be Used on IBM i 7.1"
          http://www-912.ibm.com/s_dir/SLKBase...2?OpenDocument
          "Installing Java on your IBM i server"
          http://pic.dhe.ibm.com/infocenter/is...installjdk.htm

          Comment


          • #6
            The Code-Gorilla link is down. Is the V7r1 code on another site?

            Comment

            Working...
            X