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 (http://www.appveyor.com/docs/installed-software).

  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 PATH=%JAVA_HOME%\bin;%PATH%
    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: http://www.appveyor.com/docs/installed-software#java

    Though I would swap the first two lines:

    SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0
    SET PATH=%JAVA_HOME%\bin;%PATH%
    
  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.

    http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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