i know it's not C++

Hey there, i know this isn't C++ related but you guys are excellent at helping. and im only doing this as a side project while learning C++ just to see a comparison between the 2 languages.

I installed Java JDK1.7.0_25. and am trying to compile a HelloWorld.java with /javac. but it keeps saying javac isn't a known internal or external command.
Even though i've added the location of the java bin (javac) folder to my environment variables btot system and user paths.

Still not working
Can anyone shed any light on why that might be? I've tried adding 4 of them in, each written differently with like /'s and \'s incase it wants it that way etc.

Did you exit cmd.exe and start it again and try?

yeah i tried that. if i direct dos too the actualy java folder that contains javac, and paste my helloworld.java file in there. javac compiles it np. but when i do it from somewhere else, it says it doesn't know what im talking about "Javac?? wtf is that??" heh
Can you post what you added to the path variable?
user variable: C:/Windows/System32/; C:\Windows\System32\; C:\Program Files\Java\jdk1.7.0_25\bin

windows variable: C:/Windows/System32/; C:\Windows; C:\Windows\System32\; C:\Program Files\Java\jdk1.7.0_25\bin

now i've tried it with bin\, bin; bin\javac.exe bin\javac.exe; also. it's a nightmare
Just for clarification, that is exactly what appears in the path variable (spaces between the entries and all)?
Last edited on
yes i opened the actual folder, clicked in the location bar at the top (in windows 7) which shows the me the exact path, and i copy pasted it into the environment variables paths
open cmd, type
echo %path%

does it print out "C:\Program Files\Java\jdk1.7.0_25\bin" ?
set path=%path%;C:\program files\java\jdk1.7.025\bin; It might be under program files(x86) also.

Then you do javac ClassName.jav
then you do java ClassName arguments_here
yup it's printing it out as i've written it in the variables. tnxtnt, also giblit, i checked in x86 and there's no java folder there

this is crazy. the program can't be that badly coded that it can't even find itself when i tell it where it is...
is there a different application i can use like netbeans or something instead of typing in notepad and compiling in cprompt?
Last edited on
well netbeans doesn't work either... great! won't let me build anything. everything is just being underlines red saying it's an error. and won't let me define public class "public class name blah blah needs to be defined" screw java, im going with c++
fixed it, thanks guys
So what did you do to fix it in case other people are having a similar problem?
Topic archived. No new replies allowed.