Closed abmusse closed 5 years ago
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
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.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
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).
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
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.
We can't deliver this because of how JAva is architected. If Java becomes available in RPM form in the future, one would then just use yum
or -i
to accomplish this (see #55)
Original report by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
Have two separate requests to create an ibmichroot for Java. Adding this issue so others know I am pursuing it.