Тёмный

How to Run Java Programs With Command Prompt (cmd) and Notepad in Windows 

Coding with John
Подписаться 358 тыс.
Просмотров 364 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 236   
@jesusdiaz5008
@jesusdiaz5008 Год назад
Thanks big dog, I appreciate content creators such as yourself. You dove straight into the point with great information. Much love ❤
@Ecstasy_Android_Gamer
@Ecstasy_Android_Gamer 2 года назад
John, you're simply the best. All the tutorials from my university never seemed to work for me until I watched your video following all your detailed steps. Thanks for making me run my first java program and making it feel so simple.
@JJJJ-gl2uf
@JJJJ-gl2uf 2 года назад
Great video. I just started a Java course on Moodle and your explanation here helped a lot. Will be following you in future. Many thanks.
@leeamraa
@leeamraa 2 года назад
I would've added command line arguments to the tutorial as this is the best way to demo them!
@adrian_tr
@adrian_tr 10 месяцев назад
Thanks. Extremly good explained
@Livebio1786
@Livebio1786 5 месяцев назад
Thank you sooo much for helping out
@jop4846
@jop4846 Год назад
amazing. i feel like i can create any app soon.😅
@reekdas9219
@reekdas9219 Год назад
thanks! that was really helpful!
@hiteshkalelkar
@hiteshkalelkar 9 месяцев назад
Thankyou sir this was very helpfull
@OmEN1443-j4h
@OmEN1443-j4h Год назад
thank you sir , It helped alot
@AHMED-ry2gy
@AHMED-ry2gy 2 года назад
John can you please do some search algorithms and more sorting videos, thank you
@EnglishMediumMathsOL
@EnglishMediumMathsOL 10 месяцев назад
Informative
@winlalitha
@winlalitha 8 месяцев назад
Thank you
@HelenRedai-h1r
@HelenRedai-h1r 23 дня назад
What should i have to do if it stac when it come in cmd
@Strawberry12352
@Strawberry12352 Год назад
Thank you so much 🤍
@kennedychidera9580
@kennedychidera9580 4 месяца назад
I downloaded eclipse and the jdk both installed yet I can't run a single program Pls I need help
@ChandanChandan-ft1ic
@ChandanChandan-ft1ic 4 месяца назад
Jhon I'm getting error it says file not found what shall I do
@therangolicanvas4127
@therangolicanvas4127 2 года назад
Very informative thnk u
@mohammedhishampc8487
@mohammedhishampc8487 Год назад
thanks man
@leodachad260
@leodachad260 9 месяцев назад
Hey John, on my side I can't find my file when I enter cd documents and dir. What should I do?
@Fluei1
@Fluei1 8 месяцев назад
Javac is not recognised as an internal or external command, operable program or batch file
@KiranKumar-bo6qs
@KiranKumar-bo6qs 9 месяцев назад
Hi John how can we download the file upload rest api jar for to upload the files in post man for that we need to run the spring boot in cmd line please help me in this, Im not able download the jar file from where we want to download from central repository i have tried is not there ? please share the link to down that file
@MuhammadFarooq-iw5fu
@MuhammadFarooq-iw5fu 2 года назад
Awsome!
@karthik33679
@karthik33679 10 месяцев назад
Thanks namaste
@adarshdas2766
@adarshdas2766 Год назад
Smooth
@durgaprasadp376
@durgaprasadp376 2 года назад
How to run scripts in command line which need third party jar’s?
@salehbinjaufan7096
@salehbinjaufan7096 2 года назад
Thank you so much .. please give me name of youtube java channel which make a desktop apps. using Java and mysql database .. 🌹
@mariojrog9465
@mariojrog9465 Месяц назад
can you make a 3D game using this?
@anthonyeishacanales-vinson9368
its telling me it cannot find my Desktop? in command prompt
@CinemaScope08
@CinemaScope08 10 месяцев назад
\* thnaks *\
@maganhassan2627
@maganhassan2627 Год назад
After installing the jdk you need to let your computer where is the jdk in order to run & complie java files you need to configure the environment variables that helps the computer to point to the jdk 😂 you didn't mention this
@F_MUHAMMADSYAFIQASYRAF
@F_MUHAMMADSYAFIQASYRAF Год назад
gg bro
@nird4897
@nird4897 2 года назад
Great video! It worked! My programming professor told me to try using cmd to run our java project, and I kept on getting errors until I watched your video. Thanks a lot!
@nird4897
@nird4897 2 года назад
And in addition, I searched for the same question few weeks ago here on RU-vid and no one was able to help me like you did. Definitely worth subscribing! 😁
@ironman......
@ironman...... Год назад
Yes absolutely this vedio helped me a lot... Thank you👍
@spudbencer7179
@spudbencer7179 7 месяцев назад
Now try with packages. 1 hour of googling and the java command still doesn't find my class declaration, in the same exact folder
@GlenyMorais
@GlenyMorais Месяц назад
Same situation here😢
@RajkumarBokkisam
@RajkumarBokkisam 15 дней назад
Use chatgt
@a99g
@a99g 7 месяцев назад
When I interd "cd Desktop" it says "The system cannot find the path specified" Any clue why? Edit: Problem solved, I just did a right click one the .java file and choose open in terminal.
@FolushoAdeoti-yy6ew
@FolushoAdeoti-yy6ew 2 месяца назад
Please explain that again I'm having the same issue
@Kakashi-rx5yc
@Kakashi-rx5yc 8 месяцев назад
I am getting this error: Could not find or load main class Demo Caused by: java.lang.ClassNotFoundException: Demo
@shahaansalman3286
@shahaansalman3286 7 месяцев назад
Not using Hello World for your initial test file is heresy!
@Wise-Child-2005
@Wise-Child-2005 2 месяца назад
In Linux we use gedit to open the file from terminal, what is it's windows equivalent?
@murewaajala445
@murewaajala445 Год назад
Could not find or load main class helloworld Caused by: java.lang.ClassNotFoundException: helloworld mine is showing this error please what can i do
@kobey3044
@kobey3044 Год назад
hi I am an idiot. I installed JDK-20 (C:\Program Files\Java) I tried many times and I cannot see the version when I type (java ~version) on dos cmd. please help me. I need to learn programming.. i am trying to pass my degree. 1:07 I am stuck here.
@CodingWithJohn
@CodingWithJohn Год назад
Just to make sure, it's "java -version", not "Java ~version"
@afifkhaja
@afifkhaja Год назад
Nice tutorial although I have an src folder with multiple packages and I need the classes from each package to be compiled into the target folder and need to run the driver class from the target folder. Is there a video on this? Thanks
@franz2027
@franz2027 2 года назад
Hi John, thank you very much for your videos. You have the best Java learning channel that I have come across. I've been using your channel to review my Java knowledge after not coding in java for 3+ years and preparing for a Fang interview. I'm also planning to do a talk on it and referencing anybody who wants to learn Java to you. My request is: "Will you please do a video on Lambdas?"
@Lyynnx-025
@Lyynnx-025 6 месяцев назад
I'm here because my OOP exam requires us to do our hands-on exam on notepad. Lezz goooo
@shady2702
@shady2702 2 года назад
Hey I got an error on javac ..that is javac is not recognised then what I want to do
@swemadeeasy1484
@swemadeeasy1484 Год назад
do you have JDK installed on your system? if so, do you have the right ENV variables? like JAVA_HOME?
@o0.jc.0o26
@o0.jc.0o26 2 года назад
Thanks for this video.. What if I have multiple classes for one program in separated files and one of them has the main method? How would I just do that for running the program? Thx Edit: i just came up with the solution. The question is that the .java files are included in a package, so in order to run the program in cmd, you must be located in the father folder of the package, and then run it typing java packageName.Main where Main is the .java file containing the main method.
@dikshyakafle5530
@dikshyakafle5530 Год назад
Thank you John, you're the best. I had an assignment to run a program in command prompt and I continuously got errors. Finally, I understood it.
@LavatejaD-tj6wi
@LavatejaD-tj6wi 3 месяца назад
Sir in my command prompt it is showing that the system cannot find the path specified while i entered cd Desktop
@THEREALBILL03
@THEREALBILL03 3 месяца назад
Then you have to cd to something else first if you go to your laptop file you can see what is before your desktop . For me I had to cd OneDrive before desktop
@LavatejaD-tj6wi
@LavatejaD-tj6wi 3 месяца назад
​@@THEREALBILL03I did what you said. My program ran successfully. Thank you bro. First i didn't entered onedrive Location. Now I understand
@abdulrrahmanalqahtani8952
@abdulrrahmanalqahtani8952 16 дней назад
What does a ( cd ) mean ? And I keep getting this message ( The system cannot find the path specified) Couldn’t get to the desktop via command prompt.
@TrinityJackk
@TrinityJackk 9 месяцев назад
John i ran mind but it keeps shoein Java is not recognize as an internal or external command what do i do?
@11tpsantostimothyphil31
@11tpsantostimothyphil31 7 месяцев назад
same
@benstockton2285
@benstockton2285 Месяц назад
You need to install Java, preferably as a JDK
@aramesmaeili4099
@aramesmaeili4099 Год назад
I am so thankful for this. This saved my life. As a beginner, I was losing my mind
@StorySorcerers
@StorySorcerers 9 месяцев назад
@codingwithjohn Error - file not found Usage : javac Use --help for a list of possible options Please help 🙏
@ileanr.progra-lw9ho
@ileanr.progra-lw9ho 9 месяцев назад
La pregunta del milllon de dolares: Cuando sea programador y un cliente me contrate por mil dolares para hacer un programa que diga Hello word (quien sabe porque que pagaria por eso) ¿le tengo que enseñar a usar el cdm? ¿Como hacen programas como NetBeans, SPSS o MineCraft para ejecutarse sin el cmd?
@Kolbenik
@Kolbenik Год назад
"For simple Java programs"... I run my Chat Server (for tesring) over a batch file with tha Java command, and it gets more and more complicated
@drg_spiritgaming7397
@drg_spiritgaming7397 9 месяцев назад
thank you jonny sins 🙏 sryy sryy John 🙏
@voizek
@voizek 4 месяца назад
Mine always just opens up into VS code, where I wrote the actual program.
@misaelpereira9679
@misaelpereira9679 2 года назад
I think since java 10 or 9 you can java files directly into CMD without compiling
@Molotom
@Molotom 2 года назад
John are you a guitar and bass player? :)
@CodingWithJohn
@CodingWithJohn 2 года назад
Yep! And drums mostly, I enjoy playing drums the most for sure. Just self taught and play songs I like.
@Molotom
@Molotom 2 года назад
@@CodingWithJohn Great! I mainly play guitar but I play a little bass and drums too. Thanks for the tutorial as well. Keep making these!!
@nirvkook
@nirvkook 10 месяцев назад
i wish u were my teacher, my teacher at course, she shoutes so loud that she made me stress more to able to learn what i'm doing, such a suck
@1shita
@1shita 11 месяцев назад
How to set code file open with notepad like that ?....in my pc showing only ...(open with VS code)
@MuizzahMAhmed
@MuizzahMAhmed 27 дней назад
what do i do if .class file wasn't created even if i did everything correctly?
@MarkLouisSayson-e8r
@MarkLouisSayson-e8r 8 месяцев назад
when I put javac it's not detecting the program. What should I do?
@madhu9635
@madhu9635 Год назад
You look like Jonny sins 😅
@AmandaArcanjo-e3k
@AmandaArcanjo-e3k 2 месяца назад
Awesome classes has always. Also, Binding of Isaac! YES
@youinagacha8340
@youinagacha8340 Год назад
Thank you so much my school couldn't teach me that in a month you just did it in a minute
@Ololade_dgr8
@Ololade_dgr8 Год назад
So relatable 😂❤
@JackQuincy-d9i
@JackQuincy-d9i 15 дней назад
Hall Anthony Lopez John Rodriguez Richard
@wiljohndavebaydo
@wiljohndavebaydo 4 месяца назад
After the { how do you click enter that starts on the 2nd line and not in the first line below?
@YvonneLevin
@YvonneLevin 7 дней назад
Walker David Hernandez Sharon Robinson Robert
@Sujalchaudhary004
@Sujalchaudhary004 Год назад
Why in my commant prompt it is showing the system cannot find the path specified ❓❓❓❓❓❓
@sixihili1956
@sixihili1956 10 месяцев назад
i am using windows 7 and when i type "javac myProgram" the command line says: javac is not recognized as an internal or external command. knowing that i have java installed when i typed "java version". What could be the problem?
@davidmacecek4226
@davidmacecek4226 3 месяца назад
i use win11 and this is happening to me too
@SaturoGojuo
@SaturoGojuo 6 месяцев назад
how do i make this code in my notepad automatically create a space, thanks!
@aljei9146
@aljei9146 Год назад
Hi, John. Thank you for this tutorial, really helped me a lot. Question though, what if I have multiple classes?? How do I compile and run it in the cmd? Or is it even possible?
@tiagomuniz1043
@tiagomuniz1043 Год назад
I have the same question...
@samanmehralipoor9773
@samanmehralipoor9773 2 года назад
why do you use windows when we have linux ? that is weird i think
@НастяЩ
@НастяЩ 25 дней назад
Walker Shirley Davis Edward Jones Lisa
@prokopii18
@prokopii18 2 года назад
You are a star, amazing explanation and you make amazing videos!
@PorfiriyPorfirievich
@PorfiriyPorfirievich 9 месяцев назад
Interesting enough, I've just noticed that if I run command: java MyClassName.java WITHOUT compiling it first at all, it still works just fine. Perhaps, it depends on a version of JDK (and JRE respectively) that it compiles the program 'under the hood' when I just run the java command (?)
@labib8705
@labib8705 Месяц назад
My system is not creating .class file automatically
@simple.simple210
@simple.simple210 2 месяца назад
THANKS TO YOU SIR MY CODE FINAALY RUN THANK YOU SO MUCH!
@Billkarr98
@Billkarr98 10 дней назад
You are the best man I been struggling for the past days to solve this proble and you just taught me it in just five minutes I really appreciate man
@Frankenstein8260
@Frankenstein8260 Год назад
I had a hard time finding my file. It was in a OneDrive directory that I couldn't access in cmd unless I typed it as %OneDrive%. Then I was able to find it in the Desktop directory. Hope this helps someone. :)
@lucianoprokilla
@lucianoprokilla 5 месяцев назад
John, I couldn't help but notice your barebones dash DOES include The Binding of Isaac. Great game choice!
@anubisthealmightycat6322
@anubisthealmightycat6322 Год назад
what does error: Class names, 'AmongUsJava.Java', are only accepted if annotation processing is explicitly requested 1 error mean
@BalaBhaskarNaraharisetti
@BalaBhaskarNaraharisetti 9 месяцев назад
hey i have done the things u said but in cmd i have a issue that i have given cd desktop and enter then it us giving that C:\Users\endg3>cd Desktop The system cannot find the path specified. how to solve this.
@gabfuwak
@gabfuwak Год назад
Hello, i have an issue, i have multiple classes in a project, they also use imports. This method does not support that and i can't seem to find any documentation on compiling a full java project in the command line. Do you have any clue on this?
@suuuuuuppp
@suuuuuuppp Год назад
Why var, const, let , console.log() are giving giving error name/command not found.
@CodingWithJohn
@CodingWithJohn Год назад
Are you writing JavaScript code instead of Java code? They have similar names but are very different things.
@rayyan-n9k
@rayyan-n9k 9 месяцев назад
from the background bro looks like musician
@CindyAudyaPriecillia
@CindyAudyaPriecillia 4 месяца назад
thank youuu so muchhhh this help me to do my assignment, at first i'm very confuse but i found this video and finally it work yayyy✨
@komalsingh-b2l
@komalsingh-b2l 9 месяцев назад
Thanku so much sir . Your video is really helpful for me you can simply teach us how I can use cmd. Once again thanku so much ❤❤❤❤❤
@Swathi12383
@Swathi12383 4 месяца назад
Thank u so much 🙏🙏 I watched so many videos but didn't get it to run Java in CMD...ur video helped me a lot...❤
@MICHAELJOSEPH-x9f
@MICHAELJOSEPH-x9f Год назад
am actually intrested in creating an app using java language
@BoonkiCoC14
@BoonkiCoC14 2 года назад
Ah this doesn’t look so appealing to me for some reason. I really like the way haskell does it in cmd. Just open up ghci and run the code from there easy peasy.
@arnavchauhan9637
@arnavchauhan9637 9 месяцев назад
Thanks sir for providing the wonderful commands previously i had to run task build java then click on run button it was too time consuming but its so simple.....
@suknayateluguworld1012
@suknayateluguworld1012 8 месяцев назад
I am new to learn coding recently start learn to do coding in java there vast syllabus there is no time to cover all the topics right now to me i want to do coding in java please share some tricks and tips and shortcut to able to do java coding and do tasks u r ans and support is very much need I am impressed by u r knowledge I hope u solve my problem dear❤
@nandakishor7877
@nandakishor7877 Год назад
Hloo sir, When I entered cd desktop in cmd I found The system cannot find path specified... What can I do sir......
@heckNahw
@heckNahw 3 месяца назад
do you know how to run a program thats been coded under the OOP paradigm? i have a multiclass program and it seems to not work if i run my main class using this method.
@CodingWithJohn
@CodingWithJohn 3 месяца назад
The brand new version of Java, 22, now supports this by default from the command line. So if you haven't yet, give that a download. You shouldn't even need to do the javac command anymore, just "java YourMainClassName.java" should do it, even for multi class programs.
@heckNahw
@heckNahw 3 месяца назад
@@CodingWithJohn thanks, gonna check it up right now.
@Rosa-wg3gv
@Rosa-wg3gv Год назад
Why cant I find anything when I search for it in my command prompt. I write "cd Desktop" and it just says they cant find it
@Gust52
@Gust52 Год назад
Can you show us if there's a way to view the bytecode and machine code of our Java Program as well? Thanks!
@Gestr3482
@Gestr3482 Год назад
can't get it to work. Gives me a file not found error. Followed all the steps exactly as described.
@ilyarepin7750
@ilyarepin7750 2 года назад
I did this and javac compiled the program and makes a .class file but I cant run it. Java command keeps saying it cant find it
@sforsuraj7255
@sforsuraj7255 2 года назад
I learnt a lot from your videos in past 24 hrs. Thank you sir for sharing such videos.
@SagarSharma-pb6xh
@SagarSharma-pb6xh 5 месяцев назад
I attend my college lectures of java but didn't understand anything but by watching your single video I got know the basics of java thank you sir ❤
Далее
Learn Java in One Video - 15-minute Crash Course
14:54
Просмотров 724 тыс.
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 162 тыс.
ОБЗОР НА ШТАНЫ от БЕЗДNA
00:59
Просмотров 263 тыс.
My 10 “Clean” Code Principles (Start These Now)
15:12
Creating, Compiling, and Executing a Java Program
10:25
Optionals In Java - Simple Tutorial
15:53
Просмотров 213 тыс.
Generics In Java - Full Simple Tutorial
17:34
Просмотров 1,1 млн
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 162 тыс.