This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Putting on my geezer hat: I think -cp did work in all versions on the Microsoft Java SDK. They probably got tired of typing so may letters, just like they used com.ms... for all their classes instead of com.microsoft...
Well, I think everyone has answered the wrong question.
We're in the SCJA forum, and you asked "which is it for the exam?"
The answer is neither!
-cp is not tested on the SCJA exam, and certainly not for the javac utility.
From the Sun objectives:
"Demonstrate the proper use of the "javac" command (including the command-line options: -d and �classpath), and demonstrate the proper use of the "java" command (including the command-line options: -classpath, -D and �version)."
This exam covers a huge and broad amount of information, but much of it at a high level. The people that have talked to me after failing (because they didn't buy my book, of course ) the exam are experts at syntax and every single javac and java switch, but they don't have a good feel for the proper application of JSPs, when to use Web Services, the drawbacks of distributed programming with Applets and/or Servlets, and big picture stuff like that.
For the Sun Certified Java Associate exam (SCJA), you must keep to the objectives, otherwise you'll be studying the wrong things (like -cp). -cp is an SCJP topic.