Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created April 21, 2021 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelajev/96f6ccab3f8d17cef754c0263a062ebb to your computer and use it in GitHub Desktop.
Save shelajev/96f6ccab3f8d17cef754c0263a062ebb 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