# JAVA\_HOME is not exported for arm64 architecture

**URL:** <https://travis-ci.community/t/java-home-is-not-exported-for-arm64-architecture/6993>\
**Category:** Multi CPU Architecture\
**Tags:** java, bug\
**Created:** [January 24, 2020, 9:54am UTC](https://travis-ci.community/t/java-home-is-not-exported-for-arm64-architecture/6993 "2020-01-24T09:54:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 24, 2020, 3:09pm UTC](https://travis-ci.community/t/java-home-is-not-exported-for-arm64-architecture/6993/3 "2020-01-24T15:09:29Z")

</div>

Curiously,

> **[Installation | AdoptOpenJDK](https://adoptopenjdk.net/installation.html?variant=openjdk11&jvmVariant=hotspot#linux-pkg)**
>
> AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.

  
does not mention `$JAVA_HOME` for Linux installation.

We can guess the value based on files at hand, and it would go something like this:

```auto
f=$(which javac)
while [[-L $f]]; do f=$(readlink $f); done
export JAVA_HOME=${f%/bin/*}

```

The result is something like this: [https://travis-ci.org/BanzaiMan/travis\_production\_test/builds/641393626#L890](https://travis-ci.org/BanzaiMan/travis_production_test/builds/641393626#L890)

Could you add the snippet above in your build and see if that meets your needs?

Thanks.

---

_[View the full topic](https://travis-ci.community/t/java-home-is-not-exported-for-arm64-architecture/6993)._
