Installing Java on online Gitlab ci
<p>Here is my .gitlab-ci.yml script. </p>

<pre><code>before_script:
  - uname -a
  - apt-get install default-jre default-jdk openjdk-7-jre openjdk-7-jdk
  - java -version
  - export MODE="service"
  - export PID_FOLDER="/var/run/gitlab-runner-test"

dev:
  script:
    - chmod +x gradlew
    - ./gradlew assembleDebug
</code></pre>

<p>I am trying to run the script on gitlab.com page to compile a android project. I checked with some alterations to my script that there is no java installed on the ci
 linux Linux runner-8a2f473d-project-881036-concurrent-0 4.5.0-coreos-r1 #2 SMP Thu May 5 07:27:26 UTC 2016 x86_64 GNU/Linux. </p>

<p>I tried installing java, just like a sample which was shown for ruby, but it does not work, and gives an Unable to locate package error. </p>

<p>I am not sure what should be the package as it seems like a ubuntu system, but the command which works on my ubuntu does not work here.</p>

<p>This is not a local installation.</p>