# Arch s390x has JRE but most builds of java needs jdk

**URL:** <https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143>\
**Category:** Environments\
**Tags:** java\
**Created:** [September 18, 2021, 9:55pm UTC](https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143 "2021-09-18T21:55:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![romani](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/romani/32/3750_2.png) [@romani](https://travis-ci.community/u/romani)\
**Post date:** [September 18, 2021, 9:55pm UTC](https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143/1 "2021-09-18T21:55:56Z")

</div>

logs from build on arch s390x

```auto
Setting up libsisu-plexus-java (0.3.3-3) ...

Setting up libmaven3-core-java (3.6.3-1) ...

Setting up default-jre-headless (2:1.11-72) ...

Setting up openjdk-11-jre-headless:s390x (11.0.11+9-0ubuntu2~20.04) ...

update-alternatives: using /usr/lib/jvm/java-11-openjdk-s390x/bin/java to provide /usr/bin/java (java) in auto mode

update-alternatives: using /usr/lib/jvm/java-11-openjdk-s390x/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode

```

JRE is installed, and as result there are problems with build due to:

- missed javadoc tool in java installation, example: [Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/sevntu-checkstyle/sevntu.checkstyle/jobs/538186380#L4043)
- some weird problems to instrument classes by jacoco coverage library, example - [Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/sevntu-checkstyle/sevntu.checkstyle/jobs/538186382#L3750)

---

<div class="post-metadata">

**Author:** ![romani](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/romani/32/3750_2.png) [@romani](https://travis-ci.community/u/romani)\
**Post date:** [September 18, 2021, 10:04pm UTC](https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143/2 "2021-09-18T22:04:13Z")

</div>

I tried to insdtall jdk8 by hack from [JDK 8 and Maven missing in ARM64 despite `jdk: openjdk8` - #12 by native-api](https://travis-ci.community/t/jdk-8-and-maven-missing-in-arm64-despite-jdk-openjdk8/11450/12), but it does not work  
here is example of failure: [Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/sevntu-checkstyle/sevntu.checkstyle/jobs/538221900#L687)  
`Error: dl failure on line 894; Error: failed /usr/lib/jvm/adoptopenjdk-8-hotspot-s390x/jre/lib/s390x/server/libjvm.so, because libffi.so.6: cannot open shared object file: No such file or directory`

---

<div class="post-metadata">

**Author:** ![romani](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/romani/32/3750_2.png) [@romani](https://travis-ci.community/u/romani)\
**Post date:** [September 21, 2021, 1:50pm UTC](https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143/3 "2021-09-21T13:50:52Z")

</div>

execution on openjdk11 on “arch: ppc64le” also has problems with JAVA\_HOME

> Caused by: org.apache.maven.plugin.MojoExecutionException: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The environment variable JAVA\_HOME is not correctly set.

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/sevntu-checkstyle/sevntu.checkstyle/jobs/538415510#L824)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

---

<div class="post-metadata">

**Author:** ![romani](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/romani/32/3750_2.png) [@romani](https://travis-ci.community/u/romani)\
**Post date:** [September 22, 2021, 1:18pm UTC](https://travis-ci.community/t/arch-s390x-has-jre-but-most-builds-of-java-needs-jdk/12143/4 "2021-09-22T13:18:27Z")

</div>

to resolve problem with not set JAVA\_HOME  
I did small workaround - [infra: setup JAVA\_HOME · sevntu-checkstyle/sevntu.checkstyle@541081a · GitHub](https://github.com/sevntu-checkstyle/sevntu.checkstyle/commit/541081a3828e38dad7c06b056cb9af2b912c5857)

```auto
      export JAVA_HOME="/usr/lib/jvm/"$(ls /usr/lib/jvm/ | head -n 1)"/"
      echo "JAVA_HOME="$JAVA_HOME
      export PATH=$JAVA_HOME/bin:$PATH

```
