View Full Version : [Java] Computer doesn't recognize "java" as a command...?
LilRyan
July 22nd, 2010, 05:18
Hey guys. I was trying to make a server, but whenever I click run.bat on my source, it says that "java is not recognized as an internal or external command."... I'm on vista. Please help :(.
Ty, Ryan
reserved
July 22nd, 2010, 05:19
right click on run.bat, edit, and post everything it says
reserved
July 22nd, 2010, 05:19
since you are on vista it probably says program files only, change it program files (x86)
Emily
July 22nd, 2010, 05:20
right click on run.bat, edit, and post everything it says
Wrong, he hasnt set his environmental variables, control panel - java - java (the tab) view, set them from there.
Divine
July 22nd, 2010, 05:22
Wrong, he hasnt set his environmental variables, control panel - java - java (the tab) view, set them from there.
Emily i posted this (I'm teamveiwing this guy).
And it doesn't recognize java as a command at all... It's weird... I'll try settin' the variables though, if you think thats it.
[Edit] its weird tho... he said his compiler worked... o_O
reese
July 22nd, 2010, 05:24
Wrong, he hasnt set his environmental variables, control panel - java - java (the tab) view, set them from there.
since you are on vista it probably says program files only, change it program files (x86)
Could be either one but more than likely its environmental variables
r3d th3m3
July 22nd, 2010, 05:25
right click your my computer icon on your desktop > properties > advance system settings > enviorment variables
in your user variables click new
Name - CLASSPATH
Value - C:\Program Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;%;
Change the jdk1.6.0_11 to whichever java update you have.
Click new again
Name - PATH
Value - %CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Sun\SDK\bin;C:\Program Files\Java\jdk1.6.0_11\bin
Once again change the jdk1.6.0_11 to whichevery java update you have.
Divine
July 22nd, 2010, 05:27
Wrong, he hasnt set his environmental variables, control panel - java - java (the tab) view, set them from there.
Ugh Emily now it's not recongnizing javac o_O... And he has jdk dl'd....
[Edit] i g2g, I told him to listen 2 whatever u say 'cause you know what your talkin' bout ^.^. Nite nite every1
reese
July 22nd, 2010, 05:29
right click your my computer icon on your desktop > properties > advance system settings > enviorment variables
in your user variables click new
Name - CLASSPATH
Value - C:\Program Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;%;
Change the jdk1.6.0_11 to whichever java update you have.
Click new again
Name - PATH
Value - %CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Sun\SDK\bin;C:\Program Files\Java\jdk1.6.0_11\bin
Once again change the jdk1.6.0_11 to whichevery java update you have.
I think Vista's different but someone with a sense of living can figure it all out from what you have said.
reserved
July 22nd, 2010, 05:29
type java in command prompt thats the guaranteed way to see if he has it or not
reese
July 22nd, 2010, 05:30
Emily i posted this (I'm teamveiwing this guy).
And it doesn't recognize java as a command at all... It's weird... I'll try settin' the variables though, if you think thats it.
[Edit] its weird tho... he said his compiler worked... o_O
If his compiler does work then his run should work. Test his compiler. Cause both should work if directed to the same java. Or he is lieing or a noob who can't tell the difference.
r3d th3m3
July 22nd, 2010, 05:34
I think Vista's different but someone with a sense of living can figure it all out from what you have said.
I have vista and that was all i needed to do..
you guys are making this way to hard.
If his compiler does work then his run should work. Test his compiler. Cause both should work if directed to the same java. Or he is lieing or a noob who can't tell the difference.
or in his run.bat he didnt have it set to his jdk version.
reserved
July 22nd, 2010, 05:37
can you just tell me what your run.bat says??
LilRyan
July 22nd, 2010, 05:45
Only the registered members can see the link.
Emily
July 22nd, 2010, 05:49
Follow the tutorial used above, but just find the path for javac, its in the java folder of my computer.
reese
July 22nd, 2010, 05:51
Only the registered members can see the link.
Lul. He meant the code in it. But yea this is making it to hard just follow the tut above like emily said.
Noob Koer
August 3rd, 2010, 00:59
Go to Start>> Computer>> C:// (Or Your Main Disk) >> Program Files>> Java >> jdk1.6.0_21 And put that in on the other versions ^^
Fenway`
August 3rd, 2010, 01:02
@echo off
Title Compiler
echo compiling...
"C:\Program Files\Java\jdk1.6.0_XX\bin\javac.exe" *.java
echo finished!
pause
replace XX with your java version, probably 20 or 21
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.