Using OpenJDK 8

java
known-issue

#1

OpenJDK 8 is present in the CircleCI LXC Container but in order to use it, you need to add the following to your circle.yml file.

dependencies:
  pre:
    - sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java
    - sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
    - echo 'export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> ~/.circlerc

Credits: originally posted by @alexey and workaround was discovered by @kimh


#2

where should it be added in machine section or dependencies section?


#3

You can put this in the dependencies section.


#4

thanks :grinning:


#5

Clarified the example in the first post.


#6