0

How to compile a program using command prompt in Windows 10 after installing jdk and setting the path?

First I downloaded the jdk and then set the path but I am unable to run a java program using command prompt.During compilation of java program an error message "can not find symbol and package does not exist" is shown on the command prompt.please help me how to avoid this error?

4th Jun 2019, 10:35 AM
Amlan
4 Respuestas
0
It usually means you are referring to a variable that doesn't exist. Show us your code if possible
4th Jun 2019, 11:59 AM
HNNX 🐿
HNNX 🐿 - avatar
4th Jun 2019, 12:47 PM
Amlan
0
It works on my end! 1. Open notepad, name the file Got.java 2. Type your code in (public class Got) 3. Run the command prompt (Windows key + R, type cmd press enter) 4. Find the file, I had mine on desktop so first I did C:\Users\(yourname)> cd desktop 5. javac Got.java 6. java Got Remember to use JAVAC and .java to compile Use only java Got when running
4th Jun 2019, 1:21 PM
HNNX 🐿
HNNX 🐿 - avatar
0
I did that but It doesn't work it always saying can not find symbol.
4th Jun 2019, 2:16 PM
Amlan