I apologize in advance for my noobish question but here it goes
I am quite new to java and I have been reading my intro book and I ran into a hitch I installed the latest version of the JDK and when through the setup wizard and the process went without a hitch. Now I wish to compile and run my first java program I oped up cmd and told it to go to C:\Program Files (x86)\java\jdk1.6.0_18\bin\javac to my first program and It cannot find the javac program and no matter how many different methods I use to tell it to start the javac my computer cannot find the program any ideas?
Do you see a file named "javac" in C:\Program Files (x86)\java\jdk1.6.0_18\bin? If so, can you post the command you are running? Or a few of them since you tried different things.
"The set strikes me as something like the set of potatoes, radishes, farming, and lunch. " - a colleague's way of comparing both overlapping and disparate groups. made me laugh and thought of the ranch
What I have been doing is C:\Program Files (x86)\java\jdk1.6.0_18\bin\javac Program Files (x86)\java\jdk1.6.0_18\bin\javac and "C:\Program Files (x86)\java\jdk1.6.0_18\bin\javac" the last one actually worked but then I ran into trouble with it finding the .java program I wanted it to compile is there a method where I can make it where I can just issue the javac command then the directory of the .java file I saw that it could be done but I was unable to get it to work correctly and I was wondering if it was a problem with the installation or the fact that im using a 64 bit version of windows?
Why did you install the 32 bit JDK with a 64 bit OS? You might consider uninstalling and reinstalling.
And, yes, I agree with David. You need to set your path. Right click my computer, select properties, select advanced system settings, and click the button that says "environment variables". Add a semicolon and the full directory name to the bin folder inside your JDK install to the PATH textbox.
When you do things right, people won't be sure you've done anything at all.
Ok I reinstalled JDK (I feel quite dumb for not looking for the 64 bit installer) and I went to set the path and I entered ;C:\Program Files\Java\jdk1.6.0_18\bin and still when I type javac into cmd windows still cannot find the command
Alright.... when you try to compile, your command prompt is in the directory of the java file?
That is to say your command looks like this:
What, exactly is in the "system variables / PATH" textbox? If windows is "not recognized command or filename" you might have a typo... copy and paste that entire textbox here
This message was edited 1 time. Last update was at by Janeice DelVecchio
When you do things right, people won't be sure you've done anything at all.
My goodness we have success!!@!!1!!!!
Thanks all who helped in this simple process gone wrong!
Now if I get anywhere in java programing everyone who helped will be able to say they had a part in the magic
So true you are! Im trying to compile my second app and I get a error saying an exception in the tread "main and a long list of where the eroor is and then it says it cannot find the class
sam johnston wrote:So true you are! Im trying to compile my second app and I get a error saying an exception in the tread "main and a long list of where the eroor is and then it says it cannot find the class
Looks like you get to start a new thread!
When you do things right, people won't be sure you've done anything at all.