How to set Windows Server 2019 JAVA_HOME

Derek Smart's Avatar

Derek Smart

29 Jul, 2019 07:43 PM

What is the proper way to set JAVA_HOME for windows server 2019? I've tried a few samples that I found, but I keep getting "
ERROR: JAVA_HOME is set to an invalid directory".

```
version: 1.0.{build}
image: Windows Server 2019

build_script:
  - docker-switch-linux
  - choco install unzip gradle
  - SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0\bin
    SET PATH=%JAVA_HOME%\bin;%PATH%
```

  1. 1 Posted by Ilya Finkelshte... on 30 Jul, 2019 05:50 PM

    Ilya Finkelshteyn's Avatar

    Hi Derek,

    Sorry for the trouble. Java is still not installed on this image. Please watch https://github.com/appveyor/ci/issues/3039. We plan to deploy it soon.

    Ilya.

  2. 2 Posted by Derek Smart on 30 Jul, 2019 05:52 PM

    Derek Smart's Avatar

    Ok. Thanks! I'll keep an eye on that thread.

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