Java support on Windows


#1

I wanted to test the Windows Early Release but it seems it’s way too early:

The language 'java' is currently unsupported on the Windows Build Environment.

Please add support for Java.


#2

For now, you may resort to language: shell and either use a pre-installed JDK ( where it is installed, i don’t know, if you find, please tell me here: https://travis-ci.community/t/paths-to-pre-installed-tools ) or use chocolatey to install an Oracle JDK: https://chocolatey.org/packages/jdk10 or https://chocolatey.org/packages/jdk11


#3

Really looking forward to this being supported officially!

With the custom way from @sormuras can that work with existing configurations that already use language: java? This is the one I’m using https://github.com/UniversalMediaServer/UniversalMediaServer/blob/master/.travis.yml


JDK Not Installed or Not On Path
#4

My situation is slightly different. I’m not trying to use java as a language, but instead the app I’m testing relies on java for one of its functions. That function uses a child process to call java -version to make sure java is installed on the machine and on the PATH, and that call consistently fails. I’ve tried installing java using chocolately, as noted above, which seems to work, but java doesn’t appear on the PATH (though the install log says PATH has been changed), even after calling chocolatey’s RefreshEnv.cmd. I’ve tried to change the PATH using every way I can think of (except powershell), followed by RefreshEnv, none of which work. Any ideas for how I get java’s bin path in to PATH? Or should I post this as a new topic? Or is there something else I need to do to “activate” java?