I have an error while trying to Compile using jGRASP and not sure how to fix

998 Views Asked by At

I recently got into programming from Highschool and started using jGRASP. When I attempted to compile my code, I got this as the output.

 ----jGRASP exec: javac -g AsciiBox.java
 ----jGRASP wedge error: command "javac" not found.
 ----   This command must be in the current Working directory
 ----   or on the current PATH to use this function.
 ----   working directory is "D:\Java\AsciiBox".
 ----   PATH is ";C:\Program Files (x86)\Java\jre1.8.0_261\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\Iseic\AppData\Local\Microsoft\WindowsApps;".
 ----   
 ----   Make sure you have the full JDK, not just the JRE, installed.
 ----   The JDK is available from https://www.oracle.com/technetwork/java/index.html.
 ----jGRASP: operation complete.

Not very sure how to fix it, but when I tried to download JDK it did not work. I clicked it and nothing would download.

1

There are 1 best solutions below

0
On

jGRASP has no idea where to look for your java compiler. The location of javac.exe must be known, set * e.g.* via environment variables.

If you cannot download the Oracle JDK, you can look into OpenJDK solutions, like Corretto.