This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am going through chapter 1 of SCJP for Java 5 by By Kathy Sierra and Bert Bates.
I am trying out the Protected members sample code on page 34-35. I have a folder called Ex2. Ex2 has two subfolders called certification and other as in the code sample. Folder "certification" holds the Parent.java, which compiles fine. Folder "other" holds Child.java. When I go to compile Child.java, I get 3 errors starting with package certification does not exist.
Here is the code:
I follow the following order when I compile the files-
set CLASSPATH=h:\Java\SCJP\Ex2 cd c:\Program Files\Java\jdk1.6.0_06\bin javac h:\Java\SCJP\Ex2\certification\Parent.java javac h:\Java\SCJP\Ex2\other\Chile.java
I get the following message: javac: file not found: certification\Parent.java Usage: javac <options> <source files> use-help for a list of possible options
Just to let you know that I don't have administrator priviliges on my Windows XP computer. I wonder if that causes me to not being able to set path. I could arrange to have the pathe variable added by an administrator if that could solve my problems.
Joined: May 20, 2008
Actually, I just checked the paths by typing the "path" command and path to "c:\Program files\Java\jdk1.6.0_06\bin exists.