Last active
April 24, 2021 05:01
-
-
Save taku0/2c52b0b13876fb892a69c92c81e8f019 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Get sample Java application. | |
test -f JavaSample.java || wget https://raw.githubusercontent.com/taku0/JavaSample/master/JavaSample.java || exit -1 | |
# Get media file. | |
test -f BigBuckBunny_320x180.mp4 || wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 || exit -1 | |
# Builds SDKs and JDKs. | |
for i in {,pkgsi686Linux.}openjfx{11,16}-sdk adoptopenjdk-hotspot-bin-{11,16} zulu graalvm11-ce openjdk{11,16} | |
do | |
nix-build -I nixpkgs=. --keep-failed --keep-going --show-trace -o ${i} -A pkgs.${i} || exit -1 | |
done | |
# Run the sample with JDKs (except `openjdk`) and SDKs. | |
for jdk in adoptopenjdk-hotspot-bin-{11,16} zulu graalvm11-ce | |
do | |
for javafx in openjfx11-sdk openjfx16-sdk | |
do | |
echo ${jdk} and ${javafx} | |
${jdk}/bin/javac \ | |
--module-path ${javafx}/lib \ | |
--add-modules javafx.graphics,javafx.controls,javafx.media,javafx.web \ | |
JavaSample.java || exit -1 | |
${jdk}/bin/java \ | |
--module-path ${javafx}/lib \ | |
--add-modules javafx.graphics,javafx.controls,javafx.media,javafx.web \ | |
JavaSample || exit -1 | |
done | |
done | |
# Run the sample with `openjdk`. | |
for jdk in openjdk{11,16} | |
do | |
echo ${jdk} | |
${jdk}/bin/javac JavaSample.java || exit -1 | |
${jdk}/bin/java JavaSample || exit -1 | |
done | |
echo done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment