Shawn Peari
asked on
First program
Hi, i have written my first program in java and named it HelloApp.java as a java file, but when i use command prompt to compile it, it gives me this error: javac: file not found: HelloApp.java
I don't know what is wrong and can someone please help me?
I don't know what is wrong and can someone please help me?
Can you provide the entire program, and can you give a screenshot of the command prompt window that you are compiling with?
Ok, so you HelloApp.java file is in... C:\Users\Shawn\Desktop\Jav a directory but you are trying to compile from just... C:\Users\Shawn directory, so it's not going to be able to find the file.
Try...
in the command prompt before trying the compile commands that you have above
Try...
cd Desktop\Java
in the command prompt before trying the compile commands that you have above
u are trying to compile the java program which is not your directory try to add c://user//shawan//desktop/ /java//Hel loapp.java
First navigate your cmd to that location and compile javac.HelloApp.java Then Run java HelloApp.java it's 100% work
First navigate your cmd to that location and compile javac.HelloApp.java Then Run java HelloApp.java it's 100% work
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.