Test multiple Java versions (7, 8) in the same build

Hi all,

Is there a way to test multiple Java versions (openjdk7, openjdk8) in the same build?

I tried “jdk_switcher” but the command is not installed so looks like we need to install it manually.

Thanks,
w

I found a solution using the following:

sudo update-java-alternatives -s java-1.7.0-openjdk-amd64