create chroot_java.lst

Issue #34 on hold
Aaron Bartell created an issue

Have two separate requests to create an ibmichroot for Java. Adding this issue so others know I am pursuing it.

Comments (4)

  1. Aaron Bartell reporter

    Running into an issue where I am getting zero response from the Java runtime.

    mkdir -p /QOpenSys/space1/QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit
    cp -R /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/* /QOpenSys/space1/QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/.
    mkdir -p /QOpenSys/litmis/spaces/L7QH2/chroot/QIBM/ProdData/Java400
    cp -R /QIBM/ProdData/Java400/* /QOpenSys/space1/QIBM/ProdData/Java400/.
    

    Next I went into the chroot space and ran the following, but it simply returned near immediately without output.

    $ /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/bin/java -version 
    $
    

    I did a cat of java and see the following:

    $ cat /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/bin/java        
    #! /usr/bin/sh
    # 5722-JV1, 5761-JV1
    # (C) COPYRIGHT IBM Corporation 2005, 2015
    # All Rights Reserved.
    # US Government Users Restricted Rights-
    # Use, duplication or disclosure restricted
    # by GSA ADP Schedule Contract with IBM Corp.
    #
    # Licensed Materials-Property of IBM
    #
    
    
    JAVA_HOME='/QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit'
    export JAVA_HOME
    
    # QJAVA/QJVATOOLS has an exit status of 0 if PASE is not 
    # yet attached to the process
    /usr/bin/system -pieb call QJAVA/QJVATOOLS
    
    
    if [ "$?" -eq "0" ]; then    # PASE NOT ATTACHED, just call QJVATOOLS
            exec /QSYS.LIB/QJAVA.LIB/QJVATOOLS.PGM java "$@"        
    else # PASE attached, call PASE binary
            exec /QIBM/ProdData/Java400/jFromPASE java "$@"
    fi
    

    I assume QJVATOOLS.PGM has something to do with spanning the gap to Java when invoked from RPG, so I look to jFromPASE instead. Next I tried to see what jFromPASE has in it, but it's a binary file so I determined to write a hello.java program and see if I could compile and invoke it.

    hello.java

    class HelloWorldApp {
        public static void main(String[] args) {
            System.out.println("Hello World!"); 
        }
    }
    

    Compile hello.java:

    /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/bin/javac hello.java
    

    The above doesn't produce a hello.class file.

    ##Any ideas?

  2. Former user Account Deleted

    Any Ideas

    Well, i chatted a IBM i Java expert. Quick answer, MAY be possible to "slide" Java into a chroot. Truth answer, many moving parts both PASE and ILE for "integrated" Java, hopefully no show stoppers, but clearly difficult task (understatement).

  3. Aaron Bartell reporter

    Doing repo upkeep. I am going to put this issue in a status of "on hold" for now until we hear back from the IBM i Java expert.

  4. Log in to comment