java 如何在jcreator中设置jdk路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11080815/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 03:42:33  来源:igfitidea点击:

How to set the jdk path in jcreator

javajcreator

提问by José Rodrigo

I have installed jdk 1.7in C:\jdk1.7.0 directoryand JCreatorin C:\Program Files directory. I set the path of correct jdk path in JCreator. But when I try to execute a java program in this I have shown the following messages:

我已经安装了JDK 1.7C:\jdk1.7.0 directory在JCreatorC:\Program Files directory。我在 JCreator 中设置了正确的 jdk 路径。但是当我尝试在此执行 java 程序时,我显示了以下消息:

          --------------------Configuration: <Default>--------------------
Error : Invalid path, "C:\Program Files\Java\jdk1.7.0_04\bin\javac.exe" -g -classpath C:\Users\USER\Documents -d C:\Users\USER\Documents C:\Users\USER\Documents\A.java 

What is the reason behind this ? Please tell me in a detail and also way to solve this problem .

这背后的原因是什么?请详细告诉我以及解决此问题的方法。

回答by José Rodrigo

I solved this issues by deleting the previous Java profile in Configure->Options->JDK Profiles.

我通过删除Configure-> Options-> 中以前的 Java 配置文件解决了这个问题JDK Profiles

Delete everything in it and create a new fresh profile.

删除其中的所有内容并创建一个新的新配置文件。

回答by Wendel

The error shows up when the following executable does not exist.

当以下可执行文件不存在时,会出现该错误。

C:\Program Files\Java\jdk1.7.0_04\bin\javac.exe

Make sure that you have the jdkexecutable installed.

确保您安装了jdk可执行文件。

回答by charity faith nulada

Error : Invalid path, "C:\Program Files\bin\javac.exe" -g -classpath   
"C:\Users\HP PAVILION\Desktop\java" -d "C:\Users\HP PAVILION\Desktop\java"   
"C:\Users\HP PAVILION\Desktop\java\das.java"

Process completed.

过程完成。

Error:Could not find or load main class das

错误:无法找到或加载主类 das

Process completed.

过程完成。