From 4c739965c24f945c12317a90306b42c0a78d3357 Mon Sep 17 00:00:00 2001 From: Ethan McCue Date: Tue, 16 May 2023 00:21:53 -0400 Subject: [PATCH 1/4] 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 From a8e39357465cae439d01967c139ae36a2b7547db Mon Sep 17 00:00:00 2001 From: Ethan McCue Date: Tue, 16 May 2023 00:39:36 -0400 Subject: [PATCH 2/4] Use simpler main! --- packages/java/21-ea+22/test.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/java/21-ea+22/test.java b/packages/java/21-ea+22/test.java index 2dc0eaa..4a4d094 100644 --- a/packages/java/21-ea+22/test.java +++ b/packages/java/21-ea+22/test.java @@ -1,5 +1,3 @@ -public class HelloWorld { - public static void main(String[] args) { - System.out.println("OK"); - } +void main() { + System.out.println("OK"); } \ No newline at end of file From 132f21cf748c232de30a6feb657c96f48cdad7d6 Mon Sep 17 00:00:00 2001 From: Ethan McCue Date: Tue, 16 May 2023 00:43:16 -0400 Subject: [PATCH 3/4] Enable preview for valhalla build --- packages/java/20-valhalla+20-75/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/java/20-valhalla+20-75/run b/packages/java/20-valhalla+20-75/run index 505e4e4..2f062dd 100644 --- a/packages/java/20-valhalla+20-75/run +++ b/packages/java/20-valhalla+20-75/run @@ -4,4 +4,4 @@ mv $1 $1.java filename=$1.java shift -java $filename "$@" +java --enable-preview $filename "$@" From ebf8fc7735dc64e7d7f8b4a01dea0ce7bac7ea9d Mon Sep 17 00:00:00 2001 From: Ethan McCue Date: Wed, 17 May 2023 22:38:38 -0400 Subject: [PATCH 4/4] Move to . seperators to not confuse the rest of the scripts --- .../java/{20-valhalla+20-75 => 20.valhalla.20.75}/build.sh | 0 .../{20-valhalla+20-75 => 20.valhalla.20.75}/environment | 0 .../{20-valhalla+20-75 => 20.valhalla.20.75}/metadata.json | 2 +- packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/run | 0 .../java/{20-valhalla+20-75 => 20.valhalla.20.75}/test.java | 0 packages/java/21-ea+22/test.java | 3 --- packages/java/{21-ea+22 => 21.ea.22}/build.sh | 0 packages/java/{21-ea+22 => 21.ea.22}/environment | 0 packages/java/{21-ea+22 => 21.ea.22}/metadata.json | 4 ++-- packages/java/{21-ea+22 => 21.ea.22}/run | 0 packages/java/21.ea.22/test.java | 5 +++++ 11 files changed, 8 insertions(+), 6 deletions(-) rename packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/build.sh (100%) rename packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/environment (100%) rename packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/metadata.json (56%) rename packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/run (100%) rename packages/java/{20-valhalla+20-75 => 20.valhalla.20.75}/test.java (100%) delete mode 100644 packages/java/21-ea+22/test.java rename packages/java/{21-ea+22 => 21.ea.22}/build.sh (100%) rename packages/java/{21-ea+22 => 21.ea.22}/environment (100%) rename packages/java/{21-ea+22 => 21.ea.22}/metadata.json (60%) rename packages/java/{21-ea+22 => 21.ea.22}/run (100%) 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 similarity index 100% rename from packages/java/20-valhalla+20-75/build.sh rename to packages/java/20.valhalla.20.75/build.sh diff --git a/packages/java/20-valhalla+20-75/environment b/packages/java/20.valhalla.20.75/environment similarity index 100% rename from packages/java/20-valhalla+20-75/environment rename to packages/java/20.valhalla.20.75/environment diff --git a/packages/java/20-valhalla+20-75/metadata.json b/packages/java/20.valhalla.20.75/metadata.json similarity index 56% rename from packages/java/20-valhalla+20-75/metadata.json rename to packages/java/20.valhalla.20.75/metadata.json index 9e6d824..de54afd 100644 --- a/packages/java/20-valhalla+20-75/metadata.json +++ b/packages/java/20.valhalla.20.75/metadata.json @@ -1,5 +1,5 @@ { "language": "java", - "version": "20-valhalla+20-75", + "version": "20.valhalla.20.75", "aliases": [] } diff --git a/packages/java/20-valhalla+20-75/run b/packages/java/20.valhalla.20.75/run similarity index 100% rename from packages/java/20-valhalla+20-75/run rename to packages/java/20.valhalla.20.75/run diff --git a/packages/java/20-valhalla+20-75/test.java b/packages/java/20.valhalla.20.75/test.java similarity index 100% rename from packages/java/20-valhalla+20-75/test.java rename to packages/java/20.valhalla.20.75/test.java diff --git a/packages/java/21-ea+22/test.java b/packages/java/21-ea+22/test.java deleted file mode 100644 index 4a4d094..0000000 --- a/packages/java/21-ea+22/test.java +++ /dev/null @@ -1,3 +0,0 @@ -void main() { - 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 similarity index 100% rename from packages/java/21-ea+22/build.sh rename to packages/java/21.ea.22/build.sh diff --git a/packages/java/21-ea+22/environment b/packages/java/21.ea.22/environment similarity index 100% rename from packages/java/21-ea+22/environment rename to packages/java/21.ea.22/environment diff --git a/packages/java/21-ea+22/metadata.json b/packages/java/21.ea.22/metadata.json similarity index 60% rename from packages/java/21-ea+22/metadata.json rename to packages/java/21.ea.22/metadata.json index 00e2e8d..2cf093c 100644 --- a/packages/java/21-ea+22/metadata.json +++ b/packages/java/21.ea.22/metadata.json @@ -1,5 +1,5 @@ { "language": "java", - "version": "21-ea+22", + "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 similarity index 100% rename from packages/java/21-ea+22/run rename to packages/java/21.ea.22/run diff --git a/packages/java/21.ea.22/test.java b/packages/java/21.ea.22/test.java new file mode 100644 index 0000000..a458a04 --- /dev/null +++ b/packages/java/21.ea.22/test.java @@ -0,0 +1,5 @@ +class Main { + public static void main(String[] args) { + System.out.println("OK"); + } +}