In my assignment spec, it states that the client and server must be executable using a command line of: java -jar <path_and_filename> [<mode>], without the use of any other command line arguments or properties. However in order to start up a rmi client/server, I need to specify at the very least the following:
Your programs MUST not require use of command line property specifications.
Regarding RMI: You MUST provide all classes pre-installed so that no dynamic class downloading occurs.
For rmi.server.hostname too: I can't see your server requires overriding default values of these properties. In that situation you are centering in a very particular network configuration (for example when the clients are outside the server LAN, and "server localhost" can not be routed by them) and as particular it is, overriding their values would not be a requirement for a correct working... And regarding java.security.policy:
Regarding RMI: You MUST not require the installation of a security manager.
So, at least in my assignment, any of these properties are required.
Would it be acceptable to hard code the values of these properties in my main startup class
Ummm, all sentence with these magic words "hard code" might make you think twice. In these situation is even worse since they are System properties, not parameters.
I' ve thinking: well, if the application were run in some of those particular network environments, it would be required that rmi.server.hostname would be overwriten....: And the best answer i can think is: The same behaviour could be extrapolated to every system property, and changing their values via the GUI is without doubts out of the scope of this application.
Of course the configuration must be done via a GUI. But it is different that, Systems properties being specified via a GUI. Systems porperties have a default value and a standard way for overriding, via the -D<property> option of the app launcher. What do you think?
As long as we must use a configuration file (the suncertify.properties) I don't think that the system properties mechanism is really necessary. I do all the configuration with the configuration file, here I have 2 kinds properties : 1.which can be changed with the actual configuration GUI (port, host, db file, etc) 2.which are not configurable with the actual GUI (rmi bind name, window ratio, etc)
I jusr rererereread my specs and I fish this :
Your programs must not require use of command line property specifications.
Regards M. [ September 12, 2006: Message edited by: Mihai Radulescu ]
SCJP, SCJD, SCWCD, OCPJBCD
Joined: Jan 26, 2006
I completely agree with Mihai.
Joined: Nov 07, 2004
I must be missing something. When I run my server without specifying the codebase property in eclipse, I get a ClassNotFoundException. I also tried to load the class dynamically in the server (for testing purpose) using Class.forName(...) and it was successful. So I thought the codebase property is mandatory for rmi servers. But from the messages above it seems to be optional. Can someone fill me in on what I am missing?