+ 1

error in CMD

after typing out the hello world program in notepad plus plus I saved it as ExampleProgram.java in the desktop and compiled it in the CMD. the bytecode was generated saved in the desktop too. then I put in java ExampleProgram. CMD gave an error could not find or load main class ExampleProgram. pls help thanks in advance

15th Sep 2016, 1:08 PM
Shan Bala
Shan Bala - avatar
3 Antworten
0
Does your class name is not same as the file name. If so change your class name to ExampleProgram
15th Sep 2016, 1:23 PM
Teja Naraharisetti
Teja Naraharisetti - avatar
0
when you save your program in notepad++ it should save on desktop as a cmd and when you click it, it should run your program. What language are you using. java? html?
16th Sep 2016, 11:51 AM
Aquarius
Aquarius - avatar
0
i am using java the bytecode is saved in desktop only also the class name and file name are the same
19th Sep 2016, 8:12 AM
Shan Bala
Shan Bala - avatar