1

I am trying to change the JDK from version 13 that comes by default to version 8 in Appveyor using the macOS image that according to their documentation is already preinstalled.

Attempts

export JAVA_HOME=`/Library/Java/JavaVirtualMachines/jdk1.8.0_232`

/usr/local/Cellar/appveyor-build-agent/7.0.2546/bash-shell.sh: line 62: /Library/Java/JavaVirtualMachines/jdk1.8.0_232: No such file or directory

export JAVA_HOME=`/Library/Java/JavaVirtualMachines/jdk1.8.0_232.jdk/Contents/Home`

/usr/local/Cellar/appveyor-build-agent/7.0.2546/bash-shell.sh: line 62: /Library/Java/JavaVirtualMachines/jdk1.8.0_232.jdk/Contents/Home: No such file or directory

export JAVA_HOME=`/usr/libexec/java_home -v 8 --exec javac -version`

Unable to find any JVMs matching version "8".

Community
  • 1
  • 1
Ruslan López
  • 4,433
  • 2
  • 26
  • 37

1 Answers1

2

I have solved it thanks to this answer.

- export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_232)

As you can see I'm asking the program java_home for the installation path of the version 1.8.0_232.

Ruslan López
  • 4,433
  • 2
  • 26
  • 37