Using JGrasp - Updated my Java Version to 21.0.2 and receiving Warning about: Java executable

146 views Asked by At

This is the message I see:

Warning: Java executable C:\Program Files\Java\jdk-21/bin/javaw.exe , that came from startup settings registry item, is not a recognized Java installation

Upon presenting the warning, JGrasp offers the User 3 options: "Cancel" "Try Again" or "Continue" If I choose Continue,

  • JGrasp opens and I can compile a simple Hello World type program without error.

I have the current Version of JGrasp - https://www.jgrasp.org/ (as of January 2024).

I am a student, just beginning to learn Java. I am not sure how to get rid of the warning I have 3 downloads for Java (SDK, FX and Jmods) on my Windows 64bit machine C:\Program Files\Java\jdk-21 C:\Program Files\Java\javafx-sdk-21.0.2 C:\Program Files\Java\javafx-jmods-21.0.2

  • I updated the Environment Variables (i.e., java -version results in 21) I had Version 20 before I updated to 21.

Is the "javaw.exe" something new per version 21 and now a problem for JGrasp?

Hoping someone can help. Thank you

I have updated JGrasp -> Settings > Compiler Settings > Workspace settings to point to version 21

2

There are 2 answers

0
davidalayachew On

You can actually sidestep this problem entirely. jGRASP gives you the option to download a version that has Java 21 prepackaged into it. That way, you don't need to do any configuration. Here is how to do this.

  1. Go to the jGRASP website --> https://www.jgrasp.org

Screenshot of the jGRASP website as of Jan 29, 2024

  1. Click Download jGRASP on the top right.

Same screenshot, but with the download button annotated

  1. Click THE 4TH GREEN DOWNLOAD BUTTON, NOT THE 1ST ONE

Download screenshot, with the correct download button annotated

  1. Once the download has finished, run the installer.

  2. Start jGRASP. This time, it should have Java 21 preinstalled onto it, so you don't have to do any configuration on your own. Java 21 comes prepackaged with this version of jGRASP.

0
lbarowski On

This is a bug in 2.0.6_15. Selecting a Java version using startup settings is not working, and if previously set you will get a warning at startup (but it will still work and use the Java version you have selected after you "Continue"). We'll get a fix out in a few days.