This is the requiremenet: 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. 1. How to start up server and client? In non-network mode, we can start by "java -jar runme.jar alone". In network mode, we can start client by "java -jar runme.jar server". Then, how can we server? 2. It flag is left out, the network client and gui must run. I can't understand it. DOes it mean "network" mode? Please give me some ideas about it. thanks.
SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJP6
To be obtained: SCEA 5
Hi George If you type "java -jar runme.jar alone" then the client application will start up with no networking involved. If you type "java -jar runme.jar" then the client application will start up and connect to the server over the network. If you type "java -jar runme.jar server" then the server application will start up. Regards, Andrew
Hi Andrew, Thank your suggestion. how about pack the db file and suncerify.properties? If I put them into runme.jar, I dunno how to access it without decompress them into working directory.. Here's my manifest file: Manifest-Version: 1.0 Main-Class: suncertify.gui.ApplicationRunner Class-Path: runme.jar
author and jackaroo
Hi George I don't think you need the "Class-Path" in your Manifest. Having it there makes your classes "Extension Classes". Do you need that functionality? Regardless, now that you have your Manifest, once you create you Jar file with that Manifest, you should be able to type "java -jar runme.jar" and the JVM will execute suncertify.gui.ApplicationRunner. Regards, Andrew