How to Run Java Program in Command Prompt (CMD) in Windows 10

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 117

  • @rickdas354
    @rickdas354 3 роки тому +27

    Genuine guy not boring us by giving lengthy intro. Quality content 😁

  • @DrSaav-my5ym
    @DrSaav-my5ym 3 роки тому +2

    Thanks, I was using an IDE but a recent project in my class requires using command line so you just saved my life.

  • @carscircle2815
    @carscircle2815 3 роки тому +6

    After watching many video related to this issue , your video helped me and I'm able to run this program successfully,Thank you sir.(Love from Assam,India)

  • @divyasreebathula3367
    @divyasreebathula3367 3 роки тому +4

    Thank u so much it help me a lot .... I was like watching videos an hour but no video was that clear explained

  • @naturesboy7482
    @naturesboy7482 3 роки тому

    Bhai sabke videos try kiye tere video se run hua program 🙏🙏🙏

  • @anshumankathait7458
    @anshumankathait7458 4 роки тому +5

    Bro You're a God. All these other videos are full crap. I don't know shit about computers and this vid really helped me. Keep on👍🏼

  •  Рік тому

    Thank you man! Your video helped me a lot! :) It was so easy. I was trying to execute a homebrew program that doesn't recognize java but this was THE solution... add the JAVA_HOME system variable.

  • @hafsaotaku2818
    @hafsaotaku2818 3 роки тому

    the only usefull and amazing video on youtube concerning this problem was yours,may god bless u

  • @rohitpatil8132
    @rohitpatil8132 3 роки тому +1

    Simple Short and Perfect Solution
    Thanx Sir

  • @mrtom-a-hawk6732
    @mrtom-a-hawk6732 3 роки тому +3

    Great video that doesn't assume you already some things about this process; clear and concise!

  • @shradhashinde9716
    @shradhashinde9716 3 роки тому

    My First java program Run Successfully .Thank you

  • @carlossolrac84
    @carlossolrac84 Рік тому +1

    If you still cant make it work: 1) Save your file inside a file named "test" on Windows 2) Click the windows button in your keyboard and type cmd 3) Copy the file path of your test file 4) Write: cd 5) Create a Main.java file in the test folder 6) Inside the Main.java file, add the "Main" class (the same name of the file) with the main method: public class Main { public static void main(string[] args) { System.out.println("Hi") } } 7) Change the package name to "package test;" in the first line of the Main.java file 8) Write the command "javac Main.java" in the cmd to compile the file to bytecode 9) Go to the parent folder, by writting the command "cd .." 10) Execute the program, by writing "java test.Main". Observations: verify if you have java installed with the command "java --version", dont forget to write the extension ".java" when compiling, dont write the extension ".class" to execute the compiled file, dont execute inside the test folder, always in the parent folder, dont forget to add the main method, dont forget that the name of the file should be the same as the name of the class, dont forget that java is case sensitive, dont forget to write the correct name of the package inside the file, dont forget to write the name of the package with a dot and then with the name of the file without the extension when running the compiled file.

  • @MitchelCosta
    @MitchelCosta 4 роки тому +5

    Thank you much for all your Java videos. Helped me figure a lot of setup questions for my Java class. Appreciate you!

  • @adesh_k
    @adesh_k 3 роки тому

    sooo legit trick i am succesfully done my first java program!
    thanks a lot

  • @sjjayaswal7621
    @sjjayaswal7621 2 роки тому

    Thanks for information , I have downloaded jdk but not know how to execute it .

  • @vishnu.s_
    @vishnu.s_ 4 роки тому +1

    thank you.my first successful java program

  • @tim_p0
    @tim_p0 3 роки тому +3

    Excellent video, worked perfectly for me. Thank you for taking the time to share your knowledge.

  • @sumanthmuktam3300
    @sumanthmuktam3300 2 роки тому

    Atlast it worked...Thanks 🔥

  • @theekshani1237
    @theekshani1237 2 роки тому

    Thank you thank you soooo much sir. It was so helpful

  • @maroofsiddiqui
    @maroofsiddiqui 4 роки тому +1

    I watched nearly 8-9 videos of people who had good Amount of subscriber but they don't worth it.
    Great work bro you deserve more likes.

  • @aneeshaks6550
    @aneeshaks6550 3 роки тому

    Thanku so much sir, it was so helpful .Your content were so perfect and not at all lagging.

  • @VII_07
    @VII_07 3 роки тому +2

    Thanks buddy you helped me alot.
    Thanks ❤️❤️

  • @omshinde6757
    @omshinde6757 2 роки тому +1

    Thank u sir, it litteraly help me

  • @dagipaul94
    @dagipaul94 3 роки тому +2

    i install it step by step as shown above it shows me the javac version but when i create a file and run it on cmd it says like this "'D:\New' is not recognized as an internal or external command,
    operable program or batch file. " what is my mistake ??? please someone help me

  • @yogeshwaran3250
    @yogeshwaran3250 Рік тому +1

    How to compile i am saving in D: but jdk in c:

  • @CraftyDrafty0
    @CraftyDrafty0 2 роки тому

    Thank you so much for this vd...it really helpful...tx a lot

  • @vvvSha
    @vvvSha 3 роки тому +6

    Sir I'm getting system can't find the path specified..what to do sirr

  • @yogeshpabbisetti4477
    @yogeshpabbisetti4477 4 роки тому +1

    really thanku brother i never forgot u love u

  • @CL50135
    @CL50135 2 роки тому +1

    I followed this exactly to the T and still am getting error file not found

  • @dinalshah6306
    @dinalshah6306 2 роки тому

    Thanku from my side also

  • @annwiser6957
    @annwiser6957 3 роки тому

    THANK YOU! Quality post.

  • @pritilove7
    @pritilove7 3 роки тому

    Excellent teaching very very great

  • @akhilkumarpatnaikvandrangi9195
    @akhilkumarpatnaikvandrangi9195 2 роки тому

    Thank you... for giving us a good content

  • @SS-ur7xb
    @SS-ur7xb 2 роки тому

    Hi I want to see how you compile in NetBeans. Do you have any video about it?

  • @HoloGrainYT
    @HoloGrainYT 3 роки тому

    Thank You,
    O great PragrammingKnowledge2

  • @MRYT-lc2jk
    @MRYT-lc2jk 3 роки тому

    Great sir

  • @hariniharini1226
    @hariniharini1226 2 роки тому

    Thanks a lot sir

  • @sarthakpanda7838
    @sarthakpanda7838 3 роки тому +2

    sir i have done all the steps.
    java -version is working but cd desktop is saying that "The system cannot find the path specified." plz help

    • @kairiannah
      @kairiannah 3 роки тому

      try: java --version (two hyphens)

  • @muhammadilyas-sp5gf
    @muhammadilyas-sp5gf 6 місяців тому

    Hi, sir when i complie the file in command prompt it will makes errors , i write the javac sample.java after pressing the enter it shows the errors, file not found sample.java , my file in notepad is java file not a text. but consistently the prompt shows errors.

  • @virajkadam5661
    @virajkadam5661 3 роки тому

    thank you so much for your help

  • @wearefamilyrr3491
    @wearefamilyrr3491 2 роки тому

    GOD BLESS YOU

  • @jananiv7105
    @jananiv7105 2 роки тому

    Sir creating note pad in desktop instead can we create it in local disk E or D is that possible please help me out of this

  • @HarshSorate
    @HarshSorate 2 роки тому

    Thanks sir.

  • @rohitshinde2416
    @rohitshinde2416 3 роки тому

    Helpful...! Thanks😊

  • @christopherroshan1699
    @christopherroshan1699 3 роки тому

    Thanks ma brother 😘

  • @gopalghule2741
    @gopalghule2741 3 роки тому

    Thank you so much 🙏🙏

  • @nazarreadymade3669
    @nazarreadymade3669 3 роки тому +1

    ive done all you given but in my cmd is coming "c:User/User>"java-version but the output is not coming in your java program it is coming like" c:User/cb>"

  • @aristidebossou
    @aristidebossou 3 роки тому

    excellent. Thanks a lot

  • @justinedumapi9381
    @justinedumapi9381 3 роки тому +1

    Thank you🥰🥰🥰

  • @aristidebossou
    @aristidebossou 3 роки тому

    very helpful

  • @SatyamPandeyx2
    @SatyamPandeyx2 3 роки тому

    Thankyou So Much

  • @5h8_b.keerthireddy68
    @5h8_b.keerthireddy68 3 роки тому

    Thank you so much

  • @amaljawahdou2037
    @amaljawahdou2037 Рік тому

    Hello Sir , I have a problem the text file is not turning to a java file after renaming it >< what to do !?

  • @lockwoowanimations4765
    @lockwoowanimations4765 3 роки тому +1

    in the end when he tells you to do cd desktop it doesnt work what do i do plz help

  • @fugeratube1334
    @fugeratube1334 2 роки тому

    thanks sir indeed...

  • @alpanapatra7218
    @alpanapatra7218 3 роки тому

    This will work for notepad++ also ?

  • @katsukiiiiiiiiiiiiiiiiiiiiiiii
    @katsukiiiiiiiiiiiiiiiiiiiiiiii 7 місяців тому

    im at the 8:00 mark and my pc gives me this when i attemt to use cd "The system cannot find the path specified."

  • @umeshmokashe1459
    @umeshmokashe1459 3 роки тому

    Thanks sir

  • @ChampsWorld937
    @ChampsWorld937 Рік тому

    Thankyouuu!!!!

  • @rohininarsingraoambegave2022
    @rohininarsingraoambegave2022 4 роки тому

    thank you so muchsir

  • @callmeyeongju3317
    @callmeyeongju3317 2 роки тому

    Thanks a loT!!!

  • @manoj_marndi
    @manoj_marndi 2 роки тому

    Edit option is not showing for PATH in SYSTEM VARIABLES

  • @dinushiariyasena653
    @dinushiariyasena653 3 роки тому

    Thank you so much!

  • @rubensilvals5554
    @rubensilvals5554 3 роки тому

    how do u write java -jar name of program.jar? When i do it it gives me this "Error: Unable to access jarfile name of program"

  • @chihironagataa
    @chihironagataa 2 роки тому

    thank u so muchh 😭

  • @gianni5423
    @gianni5423 3 роки тому

    Thanks you

  • @balajimodalavalasa7657
    @balajimodalavalasa7657 3 роки тому

    Error: could not open `C:\Program Files\Internet Explorer\java\lib\amd64\jvm.cfg'
    i am getting this

  • @gandepranaya8618
    @gandepranaya8618 4 роки тому +1

    I am unable to compile the content promp
    The process as u as done
    But y I am unable to

  • @dhushyanth8023
    @dhushyanth8023 2 роки тому

    Bro in my system for me edit option is not showing bro
    in edit enviro....in

  • @muskanmall4401
    @muskanmall4401 3 роки тому

    thank you

  • @TechSandy7263
    @TechSandy7263 3 роки тому

    thanks sir

  • @vcxv44
    @vcxv44 3 роки тому +4

    I dont know why but it dont work for me,
    the cmd say "Error: Could not find or load main class aze.java"

  • @prashiknagrale6613
    @prashiknagrale6613 3 роки тому

    website is asking for creating oracle account

  • @bharathkumar.k4131
    @bharathkumar.k4131 3 роки тому

    Sir cd Desktop cannot find path specified
    Wt to do sir

  • @ashaydeokate5673
    @ashaydeokate5673 3 роки тому +1

    Sir it showing error
    error: file not found

  • @joshna_jyo9217
    @joshna_jyo9217 3 роки тому +1

    Y am I getting could not find or load main class
    Can somebody PLZZ help🙏

    • @Alone_2044
      @Alone_2044 2 роки тому

      Yeah Me to pls help me

  • @shivamtomershiv
    @shivamtomershiv 3 роки тому

    thanks

  • @chenchen4360
    @chenchen4360 3 роки тому

    lifesaver

  • @nivyaignatious8779
    @nivyaignatious8779 3 роки тому +1

    It didn't work for me😭

  • @afasanashaikh1774
    @afasanashaikh1774 2 роки тому

    Sir Java is not run in command prompt why can I do

  • @Oluwamayowah
    @Oluwamayowah 2 місяці тому

    like it just returns the previous line
    C:\Users\User>

  • @CSE_KaaveeyahS
    @CSE_KaaveeyahS 4 роки тому +1

    Bro I apply what you said but its show error

  • @rohitnepal7674
    @rohitnepal7674 3 роки тому

    It says file not found. Help!

  • @PrinceJasoria08
    @PrinceJasoria08 3 роки тому

    Sir path pr click krke new ki option hi nhi aati

  • @AneesKhan-zf2si
    @AneesKhan-zf2si 3 роки тому

    My system is not showing the javac version and can't compile also

  • @aitislol2215
    @aitislol2215 3 роки тому

    javac command not work can you help me

  • @AyushGupta-sn8mj
    @AyushGupta-sn8mj 3 роки тому

    Hello sir class file is not opening

  • @niranjane5906
    @niranjane5906 4 роки тому

    will this work for windows 7????

  • @parrurox01
    @parrurox01 2 роки тому

    danke

  • @PickleRickSanchez
    @PickleRickSanchez 3 роки тому +1

    I don’t get how to run Java once installed

    • @dimuthusudesh850
      @dimuthusudesh850 3 роки тому

      Java programming language❤️😎👍ua-cam.com/video/UcMbREn1RRA/v-deo.html

  • @cushplayz2974
    @cushplayz2974 4 роки тому

    FIRST!!!!!!!!

  • @idspvaranasi9912
    @idspvaranasi9912 3 роки тому

    Copied video hai

  • @perfectboy
    @perfectboy 3 роки тому

    Thank you so much

  • @longodough785
    @longodough785 3 роки тому

    Thank you so much!

  • @cornes4
    @cornes4 3 роки тому

    Thanks you

  • @SiddhuGhadge09
    @SiddhuGhadge09 4 місяці тому

    thanks

  • @lovivlog45
    @lovivlog45 3 роки тому

    Sir plz Java ka program rin nahi ho pa raha h