Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created April 21, 2021 19:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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