Added: 3 years ago
From: AustinOO3
Views: 95,557
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (119)

Sign In or Sign Up now to post a comment!
  • when i type in javac HelloWorldApp.java it says javac is not recognized as an internal or external batch file etc...

    I have done the only different thing that i have done is edited with notepad++ and added a few comments with // in front of every comment line, just so i understand what i am doing

    please help someone i really want to be able to do this

  • yay i used dietel and they made me do the exact script

  • Thank you very much for this video. I have been having a heck of a time trying to figure out how to compile my first program for my programming class

  • If you need to do some testing and you have textmate (only OS X):

    - just write your code, save and hit CMD+R !

  • helped

  • old video but thank you!!!!!!!!!!!!!!!!!!!!!

  • song?

    

  • HEY! I HAVE SUCCESSFULLY downloaded the java1.7 but as i typ C:\java>javac (and my file to run) it says that it is not recognized ..what cani do?

  • Thanks! Nice Tutorial

  • why in my laptop it has only "jre6" ? :(

  • I'm trying to compile a java file that hasn't got the hello world thing in it, I want to compile it into a class file, how would I do this?

  • lmao thanks for clearing that out now i can compile and run successfully :D

  • I do everything you say and when i type javac then the file name.java, i get the response...'javac' is not recognized as an internal or external command, operable program or hatch file.

  • what is the point of doing this?

  • how to include libraries in running java only in command promt? thanks

  • Hi

    Great video, nice and simple and (unusually with tutorial videos) I could hear you fine!

    One quick and simple question: If i were to make changes to my .java files do i need to delete the .class for that before re-compiling or would it replace it automatically?

    Thanks

  • thx a lot man, gd work

  • I have the basic HelloWorld program that was created with the notepad saved to the desktop as Hello.java and I when i do the whole command prompt thing javac Hello.java it just says could not find main class program will exit

  • IF it says something like javac isnt a valid command do this.its a guaranteed fix :)

    go to control panel, system, advance system settings , environment variables.

    click -new- in USERS VARIABLES

    the name of the variable must be "path" and the next line the location of the jdk.

    C:\Program Files\Java\jdk1.6.0_18\bin;

    Don't use "java or jdk" like variable name or it will not work

    the name of the variable must be "path" so windows will know that is a path.

    now you are ready for use the jdk.

  • Thanks dude...new to coding...really wanna get into it

  • haha you said tarxt

  • osm one thanks......:) 100 % beneficial :)

    

  • it ceeps saying javac is not an internal or external command

    and i have installed jdk

  • @hypergshooter go to control panel, system, advance system settings , environment variables.

    click -new- in USERS VARIABLES

    the name of the variable must be "path" and the next line the location of the jdk.

    C:\Program Files\Java\jdk1.6.0_18\bin;

    Don't use "java or jdk" like variable name or it will not work

    the name of the variable must be "path" so windows will know that is a path.

    now you are ready for use the jdk.

  • @t89pepper thank you for this line -->C:\Program Files\Java\jdk1.6.0_18\bin; <--

    lol i definitely would not have got javac to work without it

  • @Katsuuu100 no problem ;)

  • I have custom variables that it won't compile.

  • Can i do this and make it ignore errors? cuz i'm making a minecraft mod and it keeps giving me errors even though there not just because of the minecraft mod code

  • it wont let me compile on anything it says main class cant be found...

  • most of those variables i dont have.

  • song name??? for intro

  • @hcorebabysean The Bravery - Believe

  • Very good, tks.

  • hey can i ask u a question?

    i done the javac (my app).java

    then hw come mine doesnt have a class file?

    PLS REPLY

  • @ThaNewhacker does it compile successfully?

  • @AustinOO3 what do you mean?

    im quite new to java programming...

    sorry

  • hey erm when i click compile it says " The system cannot find the path specified"

    i have done the environment things please someone help me!

    Thanks

  • Thanks, it's very helpful

  • i can help you just send me your name and pass and  ill get you up and running

  • Luv uuuuuuuuu man @Austin003 .. . ..

    Been trying to do this eventually got it .. . ..

    If "THNX" is water I give you Pacific Ocean .. . ..

  • cool i m still learning thanks man

  • Don't you think it would be better if you create one more video telling how we can use this to resolve the problem which manstie had?

    And yes, if I'm not wrong there is one more way to do this. Can't we just start the compiler and then type the code into it like we do in C++ using Turbo C++ or any other compiler like that. I have just started with java and I am using a book for that. And it says that it is not important that you always use the command to compile the programs.

  • For me, it says: helloworldapp.java:1: class, interface, or enum expected

    2.public class helloworldapp

    1 error

    Please reply ;P

  • mamon

  • que

  • thanks man for this tutorial

  • WATCH MY VID IF U NEED HELP

  • In the environmental variables there is already a set of paths in the system variables section named Path. It should be the one with C:\Windows\system32 already in it. Add a semicolon to the end of line of the entire text stream and without a space, paste the exact location of your javac.exe file. You should not have to create an entire variable in user variables

  • its not recognized apparently....wwooww.

  • make sure you install your jdk and set the class path

  • Im sorry but java is a retarded programing language

  • I have installed JDK but it still says that javac isn't a valid command.

  • @manstie If it says javac is not a valid command it means your classpath is not set. A great tutorial on how to set your path can be found by going to the link in the description above

  • @AustinOO3

    I went to the link and then I went to the other classpath tutorial link, I did everything but it still isnt working.

  • I have done everything as in this video but it does not work(i have installed jdk) when I enter HelloWorldApp.java and then press enter it says:The command "javac" is either written incorrectly or could not be found.

    what have I done wrong?

  • Thanks for posting this video! I get it now!

  • After I do the javac and the file name, it says 'javac' is not recognized as an internal or external command, operable program or batch file. What did I do wrong?

  • i like people like you that arent afraid of the microphone :D

  • my jdk and jre are saved in c:\program files ..and my java program is stored in G: ..my java program compiles without any error .. but when i try and run my program it gives me an error saying cannot locate G:\lib\amd64\jvm.cfg ..so i copied the 'lib' folder to G: ..again it compiles but doesn't run ..it gives an error sayin cannot locate G:\bin\server\jvm.dll ..so i copied the 'bin' folder to G: ..but i get the same error again..any solution?

  • were can i get javac for wm6.1 i need a compiler for pgcc and python ppc i dont have pc , just htc raphael i have jvm mysaifu 2

  • the javac command doesnt work for me, what software do I need for it?

  • JDK

  • you actually have to set it in your path find 'my computer' right click it and 'properties' then 'advanced' then 'environment variables' then look under 'system variables' for 'path' click and click 'edit' add ;C:\Program Files\Java\jdk1.6.0_14\bin right on to the end of it then hit ok for all jdk1.6.0_14 means i have java 14 change the 14 to your version of java

  • @SyntekkTeam you must set classpath variables

  • I get this

    C:\Program Files\Java>Javac HelloworldApp.java

    HelloworldApp.java:3: cannot find symbol

    symbol : class string

    location: class HelloworldApp public static void main(string[] args) ^

    HelloworldApp.java:5: package system does not exist system.out.println("hello world");

    2 errors

  • something is wrong with line 5 where it cant find a package. It's loking for a "system" package rather than the "System" package. Try capitalizing "System" and see if that works.

  • Comment removed

  • you wrote wrong. Java is very sensitive when it comes to lower and upercase symbols... in your code you wrote "public static void main(string[] args)" when the string part should have a uppercase S like this " public static void main(String[] args)"

  • i do have a problem when ever i use it it dosnt creat a class file if some one has the answer to tat pls answer me by reply so i get an email o and i have another problem some of my other file instead do this :package system dosnot exist! pls help me kida lovingly a person tat needs to learn java

  • omg, ty for this. I was doing the CD cmd incorrectly... I named it after the example in the book and I was getting so frustrated

    The lesson learned today is that if you have a question always refer to Youtube :)

  • ok beter

  • wtf your vid stops working ar 10 sec

  • I don't actually compile my .java files in command prompt. I've been using Jgrasp instead.

    however, I do run the .class files in the command prompt

  • if i were compiling a rsbot wat would be my public class

  • Ctrl+F Public Class

  • u need to download the jdk or set up the path

  • @AustinOO3 ho wer can i download the jdk? thankyou

  • i keep getting and error:

    'javac' is not recognized as an internal or external command, operable program, or batch file.

    this can't be, because i've used jcreator and compiled hundreds of files before

    :(

  • Same here I dont know what the problem is I've done this before no problem. Now no luck, I'm getting the exact same error message.

  • thanks!!!!!!!!!!!!

  • thanks a lot

  • Doesn't work for me I get

    error: cannot read: HelloWorldApp.java

    1 error

    Although I use Mac and therefore a Unix based system, but I entered the correct directory.

    I looked over the source code but can't find any mistakes in it.

  • wtf, im trying to compile my 508 runescape private sever. what version of java do u need to compile?!?

  • JDK

  • I just get errors -_-

  • Hey, uhm, can anybody tell me why it says"Java is not recognized as an internal or external comand"....

  • When you are in the folder in which your class files are in, you probably will need to type in a statement to point to the compiler, which is another eay of saying set a path to the compiler.

  • I know how to work it out cuz i had same problem but if you still want to know let me know ....

  • You must point the way to the java compiler by editing your "environment variables" (in Windows). Go to Control Panel ---> System ---> Advanced Tab ---> Environment. From here locate the "Path" variable and edit it with the full path to the jdsk (wherever you chose to install it)

  • 50 times easier to download Textpad and get the JDK compiler

  • wow...thank u.

  • I'm not really sure what u r trying to do and what errors are generated when u compile. And there is no single .class file unless ur program only consists of the main (driver) class and u mentioned u have many .class files. You can't use a pre-compiled .class file unless u want to use someone elses program they have already created.

  • Nice video !!!!!

    I had a quick question. I'm given all .class files and one of them is the driver class (with main method). Now I am told to write the code / modify only the file which contains the main method and use the rest of the .class files as they are. I am also provided with a list of public methods of the other classes which are called by the main class. I would appreciate any help in this matter as to how do I use a pre-compiled .class file.

    Thanks again.

  • Thank you for this video!

  • oh shit its showing me"system cannot find the path specified" dont know what to do. if you know how to set path pls reply...........

  • javac doesnt seem to work for me, i get the following :

    'javac' is not recognized as an internal or external command,operable program or batch file. what do i need to do??

  • why when i click on runserver or compile on the files of server it syas 'javac' is an internal command or external command how do i fix that if any 1 helps they will get anything off me@@@@@@@@@@

  • If I could only see what you were typing...

  • hey where can i find mine cuz i try only have this thats has java .;C:\Program Files\Java\jre1.5.0_04\lib\ext­\QTJava.zip

  • you can make the test pup up like a window by starting with imoprt Joption.....bla bla bla

  • can you give me an url to download the javac program

    cuz im trying to run java( my programing homework) and its not recognizing it so i need a program

  • google a program called Bluej

  • BTW, what song is that?

  • Cool vid.

    I think it is kind of lame that the text is displayed within the Command Prompt.

    Is there a way to make it so the text opens in it's own window? Like as a stand alone application.

  • I don't have that third box there what's wrong?

  • it's uploading now may take a while for it to appear

  • All people who are haveing problems with the compiler I am uploading a vid responce explaining how i fixed this problem. It is not changeing the class path but it works just as well

  • I tried many different ways but still having problem. I would apprieacte it if u can show me how to do it the proper way. when i try to compile using dos, it says "Exception in thread "main" java.lang.Noclassdeffounderror­: com/sun/tools/javac/main

    and im using windows xp environment setting. I thing where im making the mistake is the configuration part.

  • when you download the jdk it should set the classpath automatically but you can check by going under control panel > system > advanced > environment variables and under system variables check to see if JAVA_HOME is set up. If not click new and under name type JAVA_HOME and under value type your directory to your jdk. Hope this helps

  • for everyone who gets the "javac is not recognized as an internal or external command", your classpath is not set or you havent downloaded the jdk (java development kit)from sunmicrosystems.

  • i downloaded the jdk thing and i when i type javac it says:

    "'javac' is not recognized as and internal or external command or a executible batch file

  • either u didnt dowload the compiler or u dont have the classpath set up but that shouldnt b the case bcs it does that automatically when u download the jdk

  • I downloaded the JDK version 6, and I get the same "'javac' is not recognized as and internal or external command or a executible batch file"

    But maybe it didn't install correctly; I'll double-check it. Thanks for the tip!

  • i need this to creat a private server

  • well thats ur fault

  • nice u mest up my java.....

  • I have a question:

    What stuff must I download to get the "javac" command?

    Sorry for being a noob, but I'm just starting with Java. :-/

  • I'm a noob too. Go to the java web site and download "JDK version 6" JDK stands for java development kit and it includes the java compiler and interpreter. after you download it, look up online how to edit the path variable of your computer to include the folder containing the java compiler. i know this sounds like a lot but once you get started you realize it's not that hard.

  • Thanks for that

    I learned a lot

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more