Originally posted by Zhixiong Pan:
Hi Jeroen,
In the view of a requirement from my assignment instructions:The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements., I used a combo box to list both "server" and "client" options. If you think it against the requirement, would you be kind enough to give me a solution?Thank you.
Hi Zhixiong,
Jeroen T is right. What is the
java command you use to run the program? Do you have an instruction similar to the following in your assignment.
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run. So 'java -jar runme.jar alone' lanches a local database and a gui client.
'java -jar runme.jar server' lanches the database server.
'java -jar runme.jar' lanches the network client and GUI.
This does exactly the same thing as what you are trying to do with your menu.
If you have such an instruction and you do not allow the application mode to be selected from the command line then this will result in an automatic failure.
regards,
Mark