Skip to content

Commit dc8d474

Browse files
pditommasoclaude
andauthored
Add support for Java 25 (#6419) [ci fast]
Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent e2bb2f0 commit dc8d474

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ New versions of Nextflow are released regularly. See {ref}`updating-nextflow-pag
1212

1313
## Requirements
1414

15-
Nextflow requires Bash 3.2 (or later) and [Java 17 (or later, up to 24)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) to be installed. To see which version of Java you have, run the following command:
15+
Nextflow requires Bash 3.2 (or later) and [Java 17 (or later, up to 25)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) to be installed. To see which version of Java you have, run the following command:
1616

1717
```{code-block} bash
1818
:class: copyable

launch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ fi
6666
JAVA_VER=$(echo "$JAVA_VER" | awk '/version/ {gsub(/"/, "", $3); print $3}')
6767
major=${BASH_REMATCH[1]}
6868
minor=${BASH_REMATCH[2]}
69-
version_check="^(17|18|19|20|21|23|24)"
69+
version_check="^(17|18|19|20|21|23|24|25)"
7070
if [[ ! $JAVA_VER =~ $version_check ]]; then
7171
echo "Error: cannot find Java or it's a wrong version -- please make sure that Java 17 or higher is installed"
7272
exit 1
7373
fi
7474
JVM_ARGS+=" -Dfile.encoding=UTF-8 -XX:+TieredCompilation -XX:TieredStopAtLevel=1"
7575
JVM_ARGS+=" --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.fs=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED"
76-
[[ "$JAVA_VER" =~ ^(24) ]]&& JVM_ARGS+=" --enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow"
76+
[[ "$JAVA_VER" =~ ^(24|25) ]]&& JVM_ARGS+=" --enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow"
7777
[[ $NXF_ENABLE_VIRTUAL_THREADS == 'true' ]] && [[ "$JAVA_VER" =~ ^(19|20) ]] && JVM_ARGS+=" --enable-preview"
7878
[[ "$JAVA_VER" =~ ^(21) ]] && [[ ! "$NXF_ENABLE_VIRTUAL_THREADS" ]] && NXF_ENABLE_VIRTUAL_THREADS=true
7979

nextflow

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ else
344344
fi
345345
major=${BASH_REMATCH[1]}
346346
minor=${BASH_REMATCH[2]}
347-
version_check="^(17|18|19|20|21|22|23|24)"
348-
version_message="Java 17 or later (up to 24)"
347+
version_check="^(17|18|19|20|21|22|23|24|25)"
348+
version_message="Java 17 or later (up to 25)"
349349
if [[ ! $JAVA_VER =~ $version_check ]]; then
350350
echo_red "ERROR: Cannot find Java or it's a wrong version -- please make sure that $version_message is installed"
351351
if [[ "$NXF_JAVA_HOME" ]]; then
@@ -469,13 +469,13 @@ else
469469
launcher+=(--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED)
470470
launcher+=(--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED)
471471
launcher+=(--add-opens=java.base/java.util.regex=ALL-UNNAMED)
472-
if [[ "$JAVA_VER" =~ ^(24) ]]; then
472+
if [[ "$JAVA_VER" =~ ^(24|25) ]]; then
473473
launcher+=(--enable-native-access=ALL-UNNAMED)
474474
launcher+=(--sun-misc-unsafe-memory-access=allow)
475475
fi
476476
if [[ "$NXF_ENABLE_VIRTUAL_THREADS" == 'true' ]]; then
477477
if [[ "$JAVA_VER" =~ ^(19|20) ]]; then launcher+=(--enable-preview)
478-
elif [[ ! "$JAVA_VER" =~ ^(21|22|23|24) ]]; then die "Virtual threads require Java 19 or later - current version $JAVA_VER"
478+
elif [[ ! "$JAVA_VER" =~ ^(21|22|23|24|25) ]]; then die "Virtual threads require Java 19 or later - current version $JAVA_VER"
479479
fi
480480
fi
481481
launcher+=("${cmd_tail[@]}")

0 commit comments

Comments
 (0)