Install JDK

Peter Niederwieser's Avatar

Peter Niederwieser

30 Aug, 2014 11:26 PM

I need a JDK to build my Java library. Currently I'm installing a JDK with "cinst jdk8", which works but adds 5+ minutes to every build. Can a JDK be provided as part of a base image? Ideally, latest versions of both JDK7 and JDK8 were available, with their install directories bound to different environment variables.

  1. Support Staff 1 Posted by Feodor Fitsner on 31 Aug, 2014 04:01 AM

    Feodor Fitsner's Avatar

    There is Java 7 installed in default location (

  2. 2 Posted by Peter Niederwie... on 31 Aug, 2014 04:05 AM

    Peter Niederwieser's Avatar

    According to these docs, what's installed is a JRE (to run Java code). What I'm looking for is a JDK (to build Java code).

  3. Support Staff 3 Posted by Feodor Fitsner on 31 Aug, 2014 04:07 AM

    Feodor Fitsner's Avatar

    Seems you're right. Will install JDK 7 and 8 tomorrow.

  4. Support Staff 4 Posted by Feodor Fitsner on 31 Aug, 2014 05:39 PM

    Feodor Fitsner's Avatar

    Both JDK 7 and 8 have been installed on build workers:

    JDK 1.7 (C:\Program Files\Java\jdk1.7.0\bin in PATH)
    JDK 1.8 (C:\Program Files\Java\jdk1.8.0)

    JDK 1.7 is default and in PATH

  5. 5 Posted by Peter Niederwie... on 01 Sep, 2014 03:39 AM

    Peter Niederwieser's Avatar

    Thanks! Works fine for me.

  6. 6 Posted by Mike on 23 Jun, 2016 04:31 PM

    Mike's Avatar

    Is C:\Program Files\Java\jdk1.7.0\bin still installed?
    I'm seeing this in the log:

    SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0
    java -version
    java version "1.8.0_92" 
    Java(TM) SE Runtime Environment (build 1.8.0_92-b1
  7. Support Staff 7 Posted by Feodor Fitsner on 23 Jun, 2016 05:34 PM

    Feodor Fitsner's Avatar

    Location looks right:

    Though I would swap the first two lines:

    SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0
  8. 8 Posted by Christian Stein on 18 Oct, 2017 07:42 AM

    Christian Stein's Avatar

    Can you please provide a JDK 9 installation? Thanks in advance.

  9. 9 Posted by rleigh on 17 Jan, 2018 05:08 PM

    rleigh's Avatar

    Could I also second the request for a JDK9 installation in the image. With Java 9 having been out as a stable release for nearly six months, and with most maven plugins having been updated to support it, it's now viable for most Java-using projects to begin updating their projects to enable Java 9 support. Having AppVeyor support this would be most valauble.

    Many thanks for your consideration,

  10. Support Staff 10 Posted by Feodor Fitsner on 17 Jan, 2018 06:41 PM

    Feodor Fitsner's Avatar

    Java 9 is scheduled for the next image update:

  11. 11 Posted by rleigh on 17 Jan, 2018 06:58 PM

    rleigh's Avatar

    That's really great, thanks!

  12. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac