# Error when trying to execute hello-world.nf

**URL:** <https://community.seqera.io/t/error-when-trying-to-execute-hello-world-nf/2086>\
**Category:** Training\
**Tags:** nextflow\
**Created:** [April 18, 2025, 6:28pm UTC](https://community.seqera.io/t/error-when-trying-to-execute-hello-world-nf/2086 "2025-04-18T18:28:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagutm](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/nagutm/32/1775_2.png) [@nagutm](https://community.seqera.io/u/nagutm)\
**Post date:** [April 18, 2025, 6:28pm UTC](https://community.seqera.io/t/error-when-trying-to-execute-hello-world-nf/2086/1 "2025-04-18T18:28:40Z")

</div>

```auto
training/hello-nextflow -> nextflow run hello-world.nf
ERROR: Cannot find Java or it's a wrong version -- please make sure that Java 8 or later (up to 22) is installed
NOTE: Nextflow is trying to use the Java VM defined by the following environment variables:
 JAVA_CMD: /usr/local/sdkman/candidates/java/current/bin/java
 JAVA_HOME: /usr/local/sdkman/candidates/java/current

```

I get the following error when I try to run the hello-world.nf program through the training codespace. How do I resolve this issue?

---

<div class="post-metadata">

**Author:** ![robsyme](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/robsyme/32/342_2.png) [@robsyme](https://community.seqera.io/u/robsyme)\
**Post date:** [April 18, 2025, 9:35pm UTC](https://community.seqera.io/t/error-when-trying-to-execute-hello-world-nf/2086/2 "2025-04-18T21:35:40Z")

</div>

Hi Mufaddal. Which version of the training are you looking at? This error should be resolved in v2.4.1. You can start a codespace using that version [here](https://codespaces.new/nextflow-io/training?quickstart=1&ref=2.1.4).
