java - 尝试使用 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 时它不起作用。我点击它,什么都不会下载。
解决方案
jGRASP 不知道在哪里寻找您的 java 编译器。的位置javac.exe
必须是已知的,通过环境变量设置 * eg*。
如果您无法下载 Oracle JDK,您可以查看 OpenJDK 解决方案,例如 Corretto。
推荐阅读
- octobercms - fields.yaml 中单个字段的多个触发器(OctoberCMS)
- qt - 有没有办法在 qt 中更改 TextEdit 中的字体样式?
- hadoop - HDFS 委托令牌错误
- javascript - 用javascript覆盖和求和价格
- angular - 什么是带有角度模板的组件指令?
- restsharp - c# 控制台应用程序不返回任何结果
- docker - Riofs - 未找到保险丝设备
- flask - Swagger2.0 - 定义属性中的 oneOf 运算符
- ios - WKWebView 加载了两次,试图返回我必须按两次后退导航按钮
- javascript - 在 javascript 中动态创建一个 C# 对象数组(使用 ChartJs)