Java

  • 1.  JZOS on Maven central - limitations

    Posted Mon April 01, 2024 09:04 PM
    The move to make JZOS jars available on Maven Central is welcome, however the current implementation using non-functional jars has some problems that limit its usefulness.
     
    The non-functional jars are only useful for compilation - debugging and unit tests fail.
     
    The real JZOS jars from Java 8 include functionality that works on non-z/OS systems e.g. the data conversion classes. There are even classes documented as being for use on non-z/OS platforms, e.g. com.ibm.jzos.FileFactory.
     
    This functionality is very useful for developing on other platforms. It allows testing and debugging on the development machine. That is one of the attractions of developing in Java. There are obviously some JZOS functions that are z/OS exclusive, but many that are not.
     
    Problems with the current Maven JZOS jars:
     
    Java 8
    • Functionality does not match the real JZOS jars. Debugging and unit tests that work using the real jars fail with the Maven version
    • Functions that have been disabled return null instead of throwing an exception. This masks the reason for the failure, and makes it look like an error some time later in user code. The real jars throw UnsatisfiedLinkError for functions that are not available. This is far preferable because it makes the cause of the problem obvious.
    Java 11
    • Various module related problems. Using OpenJDK, it fails because module openj9.dataaccess is not found. Using the Open J9 Semeru JDK, it fails because module ibm.os390.security is not available. These module related problems probably also apply to the real Java 11 JZOS jars.
    • I am sure that if the module problems were resolved, the same problems would be seen with the Maven Central jars as with Java 8.
    It would be much more useful if the jars could be used for debugging and unit tests, rather than compilation only. There are various ways this could be done e.g. private repositories if the jars can't be made publicly available.


    ------------------------------
    Andrew Rowley
    ------------------------------


  • 2.  RE: JZOS on Maven central - limitations

    Posted Fri April 05, 2024 01:44 PM

    Hello Andrew, these are good comments and the team has entered that into our backlog for discussion. We may come back to you for clarification / follow-up, and may ask you to open official RFEs.



    ------------------------------
    James Tang
    Java on IBM Z lead
    IBM
    ------------------------------