• Post Reply Bookmark Topic Watch Topic
  • New Topic

Javac Error  RSS feed

 
bhumesh polaswar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to solve javac file not find error?
Capture.PNG
[Thumbnail for Capture.PNG]
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Well... does the demo.java file actually exist?

Henry
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

This error means that the file demo.java does not exist in the directory C:\Users\Lenovo.

Use the cd command (change directory) to go to the directory that contains your source file, and then try the javac command again.

If you are unfamiliar with the Windows command prompt, then take the time to find a tutorial and learn the basic concepts and commands of the command prompt. It's one of the essential things that you should know as a programmer.
 
Carey Brown
Saloon Keeper
Posts: 3323
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiles are case sensitive. Your class name should have begun with an upper case letter and so should have been saved in a file named Demo.java and compiled with
javac Demo.java
If you are doing this on a Windows machine, Windows itself doesn't care that the file has an upper case 'D' or not, but javac cares.
 
bhumesh polaswar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:Welcome to the Ranch.

This error means that the file demo.java does not exist in the directory C:\Users\Lenovo.

Use the cd command (change directory) to go to the directory that contains your source file, and then try the javac command again.

If you are unfamiliar with the Windows command prompt, then take the time to find a tutorial and learn the basic concepts and commands of the command prompt. It's one of the essential things that you should know as a programmer.

I have also tried the change directory command to where the file demo.Java exist but the error is same.
 
Carey Brown
Saloon Keeper
Posts: 3323
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After to change directory do you run the "dir" command to see if the file is actually there?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!