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.
In the book it's an involved question in(so I won't type it all)
It involves comiling and executing a class that needs a class that is in a jar file
the correct answer A:
javac -classpath MyJar.jar GetJar.jav (this makes sense, from what the book said about needing the whole name of the jar file in the -cp)
How is this java command working? the current directory is the directory above the jar file, but I though the whole name of the jar file was needed in the -cp, and I thought java and javac found classes in the same way.
Any assistance is greatly appreciated
PS the book has been a fantastic help and I will admit that I have laughed a few times (at the humor) while reading it