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...
Joined: Jun 14, 2006
Oh, interesting that it is new for Java 5.
I am really only interested what the exam will be like as that's where it will count. (Soon...) The plan is to take Marc's advice and stick with reality rather than documentation.
And M$ JVM coders are the only lazy gits around...count me in that group too. -cp is a good thing.
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.