Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created April 19, 2021 22:49
Show Gist options
  • Save shelajev/d7ec2901380529a9467daf35ff50e410 to your computer and use it in GitHub Desktop.
Save shelajev/d7ec2901380529a9467daf35ff50e410 to your computer and use it in GitHub Desktop.
public class Main {
public static void main(String[] args) {
GraalVM download = new GraalVM("ce", "21.1", "java11", "linux", "amd64");
var text = """
Get your favorite OpenJDK build with the GraalVM JIT compiler,
capable of native image technology,
polyglot support for JavaScript, Ruby, R, Python, Webassembly, etc
It's cool modern and all around wonderful!
Click here to download: %s!
""";
System.out.println( String.format(text, download.url()));
}
}
record GraalVM(String edition, String version, String baseJDK, String os, String architecture) {
public String url() {
return "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-" + version + "/graalvm-" + edition + "-" + version + "-" + os + "-" + architecture + ".tar.gz";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment