From 4c739965c24f945c12317a90306b42c0a78d3357 Mon Sep 17 00:00:00 2001 From: Ethan McCue Date: Tue, 16 May 2023 00:21:53 -0400 Subject: [PATCH] Add java 21+ support --- packages/java/20-valhalla+20-75/build.sh | 9 +++++++++ packages/java/20-valhalla+20-75/environment | 4 ++++ packages/java/20-valhalla+20-75/metadata.json | 5 +++++ packages/java/20-valhalla+20-75/run | 7 +++++++ packages/java/20-valhalla+20-75/test.java | 5 +++++ packages/java/20.0.1/build.sh | 9 +++++++++ packages/java/20.0.1/environment | 4 ++++ packages/java/20.0.1/metadata.json | 5 +++++ packages/java/20.0.1/run | 7 +++++++ packages/java/20.0.1/test.java | 5 +++++ packages/java/21-ea+22/build.sh | 9 +++++++++ packages/java/21-ea+22/environment | 4 ++++ packages/java/21-ea+22/metadata.json | 5 +++++ packages/java/21-ea+22/run | 7 +++++++ packages/java/21-ea+22/test.java | 5 +++++ 15 files changed, 90 insertions(+) create mode 100755 packages/java/20-valhalla+20-75/build.sh create mode 100644 packages/java/20-valhalla+20-75/environment create mode 100644 packages/java/20-valhalla+20-75/metadata.json create mode 100644 packages/java/20-valhalla+20-75/run create mode 100644 packages/java/20-valhalla+20-75/test.java create mode 100755 packages/java/20.0.1/build.sh create mode 100644 packages/java/20.0.1/environment create mode 100644 packages/java/20.0.1/metadata.json create mode 100644 packages/java/20.0.1/run create mode 100644 packages/java/20.0.1/test.java create mode 100755 packages/java/21-ea+22/build.sh create mode 100644 packages/java/21-ea+22/environment create mode 100644 packages/java/21-ea+22/metadata.json create mode 100644 packages/java/21-ea+22/run create mode 100644 packages/java/21-ea+22/test.java diff --git a/packages/java/20-valhalla+20-75/build.sh b/packages/java/20-valhalla+20-75/build.sh new file mode 100755 index 0000000..d53c085 --- /dev/null +++ b/packages/java/20-valhalla+20-75/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Put instructions to build your package in here + +curl "https://download.java.net/java/early_access/valhalla/20/openjdk-20-valhalla+20-75_linux-x64_bin.tar.gz" -o java.tar.gz + +tar xzf java.tar.gz --strip-components=1 +rm java.tar.gz + diff --git a/packages/java/20-valhalla+20-75/environment b/packages/java/20-valhalla+20-75/environment new file mode 100644 index 0000000..780b668 --- /dev/null +++ b/packages/java/20-valhalla+20-75/environment @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Put 'export' statements here for environment variables +export PATH=$PWD/bin:$PATH diff --git a/packages/java/20-valhalla+20-75/metadata.json b/packages/java/20-valhalla+20-75/metadata.json new file mode 100644 index 0000000..9e6d824 --- /dev/null +++ b/packages/java/20-valhalla+20-75/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "java", + "version": "20-valhalla+20-75", + "aliases": [] +} diff --git a/packages/java/20-valhalla+20-75/run b/packages/java/20-valhalla+20-75/run new file mode 100644 index 0000000..505e4e4 --- /dev/null +++ b/packages/java/20-valhalla+20-75/run @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Put instructions to run the runtime +mv $1 $1.java +filename=$1.java +shift +java $filename "$@" diff --git a/packages/java/20-valhalla+20-75/test.java b/packages/java/20-valhalla+20-75/test.java new file mode 100644 index 0000000..2dc0eaa --- /dev/null +++ b/packages/java/20-valhalla+20-75/test.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("OK"); + } +} \ No newline at end of file diff --git a/packages/java/20.0.1/build.sh b/packages/java/20.0.1/build.sh new file mode 100755 index 0000000..97ad372 --- /dev/null +++ b/packages/java/20.0.1/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Put instructions to build your package in here + +curl "https://download.java.net/java/GA/jdk20.0.1/b4887098932d415489976708ad6d1a4b/9/GPL/openjdk-20.0.1_linux-x64_bin.tar.gz" -o java.tar.gz + +tar xzf java.tar.gz --strip-components=1 +rm java.tar.gz + diff --git a/packages/java/20.0.1/environment b/packages/java/20.0.1/environment new file mode 100644 index 0000000..780b668 --- /dev/null +++ b/packages/java/20.0.1/environment @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Put 'export' statements here for environment variables +export PATH=$PWD/bin:$PATH diff --git a/packages/java/20.0.1/metadata.json b/packages/java/20.0.1/metadata.json new file mode 100644 index 0000000..a8710fe --- /dev/null +++ b/packages/java/20.0.1/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "java", + "version": "20.0.1", + "aliases": [] +} diff --git a/packages/java/20.0.1/run b/packages/java/20.0.1/run new file mode 100644 index 0000000..505e4e4 --- /dev/null +++ b/packages/java/20.0.1/run @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Put instructions to run the runtime +mv $1 $1.java +filename=$1.java +shift +java $filename "$@" diff --git a/packages/java/20.0.1/test.java b/packages/java/20.0.1/test.java new file mode 100644 index 0000000..2dc0eaa --- /dev/null +++ b/packages/java/20.0.1/test.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("OK"); + } +} \ No newline at end of file diff --git a/packages/java/21-ea+22/build.sh b/packages/java/21-ea+22/build.sh new file mode 100755 index 0000000..b5e9b40 --- /dev/null +++ b/packages/java/21-ea+22/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Put instructions to build your package in here + +curl "https://download.java.net/java/early_access/jdk21/22/GPL/openjdk-21-ea+22_linux-x64_bin.tar.gz" -o java.tar.gz + +tar xzf java.tar.gz --strip-components=1 +rm java.tar.gz + diff --git a/packages/java/21-ea+22/environment b/packages/java/21-ea+22/environment new file mode 100644 index 0000000..780b668 --- /dev/null +++ b/packages/java/21-ea+22/environment @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Put 'export' statements here for environment variables +export PATH=$PWD/bin:$PATH diff --git a/packages/java/21-ea+22/metadata.json b/packages/java/21-ea+22/metadata.json new file mode 100644 index 0000000..00e2e8d --- /dev/null +++ b/packages/java/21-ea+22/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "java", + "version": "21-ea+22", + "aliases": [] +} \ No newline at end of file diff --git a/packages/java/21-ea+22/run b/packages/java/21-ea+22/run new file mode 100644 index 0000000..2f062dd --- /dev/null +++ b/packages/java/21-ea+22/run @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Put instructions to run the runtime +mv $1 $1.java +filename=$1.java +shift +java --enable-preview $filename "$@" diff --git a/packages/java/21-ea+22/test.java b/packages/java/21-ea+22/test.java new file mode 100644 index 0000000..2dc0eaa --- /dev/null +++ b/packages/java/21-ea+22/test.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("OK"); + } +} \ No newline at end of file