yoda-mon commented on PR #1043: URL: https://github.com/apache/bigtop/pull/1043#issuecomment-1288550064
I added several procedures to ensure to use java 8, not java 11. - Add dependency to the class between `jdk.pp` and `jdk11.pp` for ordering. packaging systems uses `alternative` for java, and later installed version has higher priority to be default (cf https://linux.die.net/man/8/update-alternatives). - Ordering is not enough for some OSs, in this case, Debian/Ubuntu and Fedora 35, because other libraries require java 8 before installing java 11. So I ensure using `update-java-alternatives` or `update-alternatives`. We can use `update-java-alternatives` on java that from `apt` packaging, it is simple. We can only use `update-alternatives` on java that RHEL based OS's packaging system, we have to set both `java` and `javac` (Other commands are hierarchically controlled under these two, you can check by `update-alternatives --display java`. Here shows the script for a checking. ```sh OS_LIST=(centos-7 rockylinux-8 fedora-35 fedora-36 debian-10 debian-11 ubuntu-18.04 ubuntu-20.04 ubuntu-22.04) for OS in "${OS_LIST[@]}" do echo $OS docker run --rm -itd --name bigtop-test-${OS} bigtop/slaves:trunk-${OS}-aarch64 /bin/bash docker exec -it bigtop-test-${OS} java -version docker exec -it bigtop-test-${OS} javac -version docker exec -it bigtop-test-${OS} bash -cl 'echo "$JAVA_HOME"' docker stop bigtop-test-${OS} echo "" done ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
