I am a java beginner/intermediate, and am reading through the book "Advanced Java 2 Platform - How to Program - 1st Ed", by Deitel.
I am reading through Chapter 13 on RMI callbacks and the DeitelMessenger example which uses RMI between server and client.
MY QUESTION is to do with the syntax for passing in arguments with the java application launcher.
On page 837 the book says to enter the following on the command line, to start class ChatServerAdministrator. The text (A) is :
Acc to http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/java.html
any args to be passed to the main method should be listed AFTER the class name. I dont see specified here any other way. So acc to http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/java.html
(A) defines/sets 2 properties with the 2 -D options relating to policy files, and passes ONE argument, value "start", to the main method of class ChatServerAdministrator
BUT the source code ChatServerAdministrator in the Deitel book (not repeated here) is clear that it expects THREE arguments to be passed. ( If arg has value "start", then arg and arg are passed to Strings policy and codebase respectively).
So whats happening ?
1) Where are the other 2 args AFTER the class name - as required by the java app launcher syntax ?
2) Are the other 2 args somehow passed in from the two -D options ? If so how ? And where is this explained on the sun website docs. Note, the 2nd and 3rd expected args seem to be related to the above -D option policy files.
3) Is the above text (A) in the book wrong ?
Many thanks in advance to anyone who can help shed some light !