首页 > 解决方案 > 尝试使用 jGRASP 进行编译时出现错误,不知道如何修复

问题描述

我最近从高中开始学习编程并开始使用 jGRASP。当我试图编译我的代码时,我得到了这个作为输出。

 ----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.

不太确定如何修复它,但是当我尝试下载 JDK 时它不起作用。我点击它,什么都不会下载。

标签: javajgrasp

解决方案


jGRASP 不知道在哪里寻找您的 java 编译器。的位置javac.exe必须是已知的,通过环境变量设置 * eg*。

如果您无法下载 Oracle JDK,您可以查看 OpenJDK 解决方案,例如 Corretto。


推荐阅读