This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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.
Joined: Feb 08, 2010
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
you have no other paths? Most people have paths to the root and the windows folder... get rid of the semicolon.
Joined: Feb 08, 2010
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
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!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com