How to set the jdk path in jcreator

2019-02-28 15:50发布

问题:

I have installed jdk 1.7 in C:\jdk1.7.0 directory and JCreator in 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:

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

回答1:

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

Delete everything in it and create a new fresh profile.



回答2:

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 jdk executable installed.



回答3:

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

Process completed.



标签: java jcreator