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
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.
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?
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
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
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.
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
@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
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.
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?
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?
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?
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
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.
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
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.
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)
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.
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.
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@@@@@@@@@@
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.
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'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.
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
TheWTFization 3 days ago
yay i used dietel and they made me do the exact script
zomege 4 weeks ago
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
Gennedream 1 month ago
If you need to do some testing and you have textmate (only OS X):
- just write your code, save and hit CMD+R !
aavv22asdac 1 month ago
helped
codenamerondo 2 months ago
old video but thank you!!!!!!!!!!!!!!!!!!!!!
jfost784 3 months ago
song?
shadowstar619 3 months ago
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?
jackitajak09 3 months ago
Thanks! Nice Tutorial
ljgljg08 3 months ago
why in my laptop it has only "jre6" ? :(
cruelwarrior217 6 months ago
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?
TheProNinjaz 6 months ago
lmao thanks for clearing that out now i can compile and run successfully :D
Nutralityxr11 6 months ago
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.
manscape25 6 months ago
what is the point of doing this?
manscape25 6 months ago
how to include libraries in running java only in command promt? thanks
allmyloveallmylife 6 months ago
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
Absinthea 6 months ago
thx a lot man, gd work
Matnayr 8 months ago
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
ihavethelastusername 8 months ago
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.
t89pepper 8 months ago
Thanks dude...new to coding...really wanna get into it
t89pepper 8 months ago
haha you said tarxt
ybman 8 months ago
osm one thanks......:) 100 % beneficial :)
2992rahul 8 months ago
it ceeps saying javac is not an internal or external command
and i have installed jdk
hypergshooter 9 months ago
@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 8 months ago 2
@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 8 months ago
@Katsuuu100 no problem ;)
t89pepper 8 months ago
I have custom variables that it won't compile.
Cole1497 9 months ago
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
SuperJTutorials 9 months ago
it wont let me compile on anything it says main class cant be found...
historylog1 10 months ago
most of those variables i dont have.
jreynol100 11 months ago
song name??? for intro
hcorebabysean 11 months ago
@hcorebabysean The Bravery - Believe
TatsFunnyStuff 9 months ago
Very good, tks.
robsonjunioraltered1 1 year ago
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 1 year ago
@ThaNewhacker does it compile successfully?
AustinOO3 1 year ago
@AustinOO3 what do you mean?
im quite new to java programming...
sorry
ThaNewhacker 1 year ago
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
RapidDrift 1 year ago
Thanks, it's very helpful
vikesh115 1 year ago
i can help you just send me your name and pass and ill get you up and running
nevin221221 1 year ago
Luv uuuuuuuuu man @Austin003 .. . ..
Been trying to do this eventually got it .. . ..
If "THNX" is water I give you Pacific Ocean .. . ..
MegaHoney321 1 year ago
cool i m still learning thanks man
stanzin123 1 year ago
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.
chetanbhasin7 1 year ago
For me, it says: helloworldapp.java:1: class, interface, or enum expected
2.public class helloworldapp
1 error
Please reply ;P
AnythingDark 1 year ago
mamon
recu27 1 year ago
que
recu27 1 year ago
This has been flagged as spam show
thanks man for this tutorial
officeworker91 1 year ago
thanks man for this tutorial
officeworker91 1 year ago
WATCH MY VID IF U NEED HELP
jeffhardyrulez900 1 year ago
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
MrElevater13 1 year ago
its not recognized apparently....wwooww.
bubbles1062 1 year ago
make sure you install your jdk and set the class path
LearnTechTv 1 year ago
Im sorry but java is a retarded programing language
gruntlover2 1 year ago
I have installed JDK but it still says that javac isn't a valid command.
manstie 1 year ago 4
@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 1 year ago
@AustinOO3
I went to the link and then I went to the other classpath tutorial link, I did everything but it still isnt working.
manstie 1 year ago
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?
getlower789 1 year ago
Thanks for posting this video! I get it now!
TheRoxAnneJ 1 year ago
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?
Conn210 1 year ago
i like people like you that arent afraid of the microphone :D
rune500125 1 year ago
This has been flagged as spam show
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?
tarunpai 1 year ago
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?
tarunpai 1 year ago
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
poisedo 2 years ago
the javac command doesnt work for me, what software do I need for it?
SyntekkTeam 2 years ago
JDK
MrRsgoofy 2 years ago
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
jace0man 2 years ago
@SyntekkTeam you must set classpath variables
DokFuture 2 years ago
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
taylorprice123 2 years ago
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.
dobbersp 2 years ago
Comment removed
breached25 2 years ago
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)"
invidos 2 years ago
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
ss4pandaman 2 years ago
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 :)
Strichnine19 2 years ago
ok beter
insane90100 2 years ago
wtf your vid stops working ar 10 sec
insane90100 2 years ago
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
GreyWolfyutuub 2 years ago
if i were compiling a rsbot wat would be my public class
healmeh 2 years ago
Ctrl+F Public Class
FrozenIceCweam 2 years ago
u need to download the jdk or set up the path
AustinOO3 2 years ago
@AustinOO3 ho wer can i download the jdk? thankyou
zhaevih21 1 year ago
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
:(
Salamander014 2 years ago
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.
moali68 2 years ago
thanks!!!!!!!!!!!!
MoreCheesePleez 2 years ago
thanks a lot
RATING567 2 years ago
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.
iduno14 3 years ago
wtf, im trying to compile my 508 runescape private sever. what version of java do u need to compile?!?
tuckavids 3 years ago
JDK
yewtubepl0x 2 years ago 2
I just get errors -_-
TechnoMstory 3 years ago
Hey, uhm, can anybody tell me why it says"Java is not recognized as an internal or external comand"....
homerhomer101 3 years ago
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.
PR0GRAMMING 3 years ago
I know how to work it out cuz i had same problem but if you still want to know let me know ....
hewad1923 3 years ago
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)
ShaggaKhan 2 years ago
50 times easier to download Textpad and get the JDK compiler
Disemflect 3 years ago
wow...thank u.
k0p0l 3 years ago
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.
AustinOO3 3 years ago
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.
neil0410 3 years ago
Thank you for this video!
ChrisL216 3 years ago
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...........
saddamdon 3 years ago
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??
Claudia17McC 3 years ago
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@@@@@@@@@@
AndyProductionz 3 years ago 2
If I could only see what you were typing...
rsnoob5555 3 years ago
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
chivas408 3 years ago
you can make the test pup up like a window by starting with imoprt Joption.....bla bla bla
bashorry 3 years ago
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
bashorry 3 years ago
google a program called Bluej
drummer9327 3 years ago
BTW, what song is that?
Victordove 3 years ago
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.
Victordove 3 years ago
I don't have that third box there what's wrong?
jay733 3 years ago
it's uploading now may take a while for it to appear
NationalSchoolNews 3 years ago
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
NationalSchoolNews 3 years ago
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.
LuqmanMA 3 years ago
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
AustinOO3 3 years ago
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.
AustinOO3 3 years ago
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
tehsniperpirate 3 years ago
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
AustinOO3 3 years ago
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!
wickedangela777 3 years ago
i need this to creat a private server
zackhi123 3 years ago
well thats ur fault
AustinOO3 3 years ago
nice u mest up my java.....
michael5267 3 years ago
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. :-/
t3hdewd 3 years ago
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.
iHEARTlag228 3 years ago
Thanks for that
I learned a lot
Fahs4334 3 years ago