Java Fix Java Compile Error: "The system cannot find the path specified.

  • Thread starter Thread starter GiTS
  • Start date Start date
  • Tags Tags
    Java
Click For Summary
The user is encountering an issue with the command line while trying to compile a Java program, receiving a "The system cannot find the path specified" error when executing "C:\jdk6\bin\javac HelloWorldApp.java." The discussion suggests that both the Java compiler and the HelloWorldApp.java file are located in the C:/ folder. To resolve the issue, it is recommended to use the command "C:\javac HelloWorldApp.java" if the compiler is indeed in the C: drive. Additionally, users are advised to ensure that the path to the javac executable is included in the system's PATH environment variable. There is also a note on using the correct directory separator, recommending "\\" or "/" instead of a single backslash to avoid compile errors.
GiTS
Messages
132
Reaction score
0
My problem is the first one listed here http://java.sun.com/docs/books/tutorial/getStarted/problems/index.html

But when I type C:\jdk6\bin\javac HelloWorldApp.java I get the message "The system cannot find the path specified."
Both the compiler and HelloWorldApp.java file are in C:/ folder. I'm using the jdk-6u6-windows-i586-p-iftw compiler.

What am I doing wrong?
 
Technology news on Phys.org
If they are in the C:\ folder give the command
C:\javac HelloWorldApp.java
or add the search path of javac to your path
 
If you put "\" between directories, you get a compile error. Instead of this sign you should put "\\" or "/". This is something that I remember from my cs courses. You should tyr this, but it might not solve your problem.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

Replies
1
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K