File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Some more Queries on URLyBird Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Some more Queries on URLyBird" Watch "Some more Queries on URLyBird" New topic
Author

Some more Queries on URLyBird

Sam Codean
Ranch Hand

Joined: Feb 26, 2006
Posts: 194
Hi All,
Some more questions if someone can help

1. What does it mean by the following statement?


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>]



All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:

* The executable JAR containing the programs. This must be called runme.jar.


From the above two statements i think that there must be only one command to run this program whereas i was thinking that there must be two commands fired one to start the server and the other to start the client.

2.

All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.


Does this mean details like server port number, etc. This would then mean that the server and client are separately invoked

Getting a lot of queries in mind. Please could someone help me with these?


-Sam Codean<br />SCJP 1.4 (98%)<br />SCJD 5.0 (87.5%)
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hello Codean,
Regarding jar packaging i recommend you look this thread
All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory
IMO this statement is requiring a GUI for the server.
Here is my implementation, hope it help you:



Regards
[ April 22, 2006: Message edited by: Oricio Ocle ]

SCJP, OCMJD, OCMJEA
Sam Codean
Ranch Hand

Joined: Feb 26, 2006
Posts: 194
Thanks Oricio,
This is really helpful. I will try to make something similar.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
The logical structure I chose is as follows:

Inside the jar there's a small launcher program which (depending on the argument to the JVM) launches another program which is either the server or the client.
The main-class attribute of the jarfile points to that launcher.

Both client and server are Swing applications (though the server has an optional text-only mode which is automatically invoked when it's run on a machine/console without videohardware).

For testing I can just run the server or client directly, and in my choices.txt I've justified the system further by pointing out that this structure makes it possible to in the future package server and client independently and just distribute either one to whereever they're needed.
Similar with the text-only mode for the server, which I justified as a need for testing as well as a capability for remote deployment to servers (which often means you have telnet-only access and can't run graphical subsystems).

For delivering the final submission, follow the jar-in-a-jar system outlined in the linked thread.


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Some more Queries on URLyBird