I need help with this: (From Head First Java 2nd Edition)
Once you've downloaded and unpacked/zipped/whatever (Im using win XP), you need to add an entry to your PATH environment variable that points to the /bin directory inside the main Java directory.
Doing this: % javac
needs to let CMD find the javac compiler.
This is kind of embarrassing, because I can't even get through the intro in my JAVA book, but I am VERY new to this (started about 20 minutes ago).
Also, if you think I should be learning from a different book, then tell me BEFORE I delve deeply into this one (HEAD FIRST JAVA).
Head First Java is the book im reading aswell, and i had to change my path aswell to get things on the CMD line flowing, i hope you enjoy the book i know i am!
Wants to change the world....
Theo Rabke
Greenhorn
Joined: Nov 15, 2010
Posts: 2
posted
0
Thanks for the fast reply. Worked like a charm. Do you think that the book I am using is fine?
I'm having a similar problem creating the Path. I'm reading Head First Java 2nd Edition. Using Windows 7.
I've followed the directions posted on the "How to create your first java program". However, the Path (shown below) seems to go through Program Files (x86). My jdk1.6.0_23 is in the Program Files. No (x86)
I've deleted the (x86) from the Path and it seems to work fine. I'm just wondering if there are any bad consequences for doing this? Should I create a new path instead of the one already there? Should I do the same for the classPath?
This is most interesting, especially since the only path you have changed is that of QuickTime.
Do Oracle and and Apple have some relations we should know about?
Chad Kusuno
Greenhorn
Joined: Nov 17, 2010
Posts: 8
posted
0
No. I input the Path just as the instructions said. However, when enter "javac -version" in the in the cmd line it would state "is not recognized". This was because the Path was reading from the Program Files (x86) file. I have the jdk1.6.0_23 saved in the Program File file. Once I changed the Path to the Program File things seems to work fine. I'm just wondering if there are any consequences to doing this and if the ClassPath file needs to read from the Program File as well? This is a Program File (x86) vs Program File issue I believe. I don't know if the previous version of the jdk were 32 bit vs the current 64 bit version and if this even matters?
Chad Kusuno
Greenhorn
Joined: Nov 17, 2010
Posts: 8
posted
0
I have no clue why Quicktime was in the Path name? You can probably tell I have no clue what I am doing. Any help would be awesome. Thanks.
PATH is not Java specific. Cmd uses it to search for relative paths. Apparently QuickTime adds another value to it.
Every value is separated by a semicolon. The value you want is %JAVA_HOME%\bin. %JAVA_HOME% is another environment variable, which specifies the path of your Java installation. Look for another variable named JAVA_HOME (not PATH) and set its value to the path of your jdk (the parent folder of the bin folder you have java.exe, javac.exe etc in).