jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes running the application - B&S Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "running the application - B&S" Watch "running the application - B&S" New topic

running the application - B&S

Dan Murphy
Ranch Hand

Joined: Mar 29, 2005
Posts: 126

Question 1
My assignment says that:

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

I'm not sure whether this means that the above command should individually execute either the client or the server (depending on <path_and_filename> , or whether it means that the above command should execute both? My guess is that it means both, because it doesn't really make sense to provide a [<mode>] parameter when running the server.

Question 2
The assignment also says that:

"The program must allow the user to specify the location of the database"

As only the command-line parameter referred to above is allowed, I suppose they'll have to specify the location of the database via the GUI. The nicest way to do this would be by opening up the familiar dialog box used to select a file to open. However the database file could reside on a different machine to the client GUI, so I can't simply open a dialog allowing the user to choose a file on the local machine.

Although I could instead just provide a field where the user types in the path to the file on the server machine, this is not terribly user friendly.

Thanks in Advance,

Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
Hi Dan,

If you type "java -jar runme.jar alone", then the application will run in standalone mode. "java -jar runme.jar server" will start the server only. "java -jar runme.jar" will start the networked client only.

By the way, the questions you are positing in this forum are all good questions. However, I have noticed that most of them have been discussed here before. Try searching the forum for an answer to your question(s), and if you still have uncertainties, post again and other ranchers can help.

Also, I am not trying to be a jerk by suggesting you search the forum... Many times, there is more than one correct solution to the issues you are facing. Searching the forum gives you the opportunity to look at all the sides and then make an educated decision for yourself.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Dan Murphy
Ranch Hand

Joined: Mar 29, 2005
Posts: 126
Thanks for your reply Paul ad your suggestion about searching the forum.
I'd be interested to hear if you have any thoughts about "Question 2" above. Is it sufficient to enable the user to supply a path to the location of the file on the server, or if not, how can they browse the file system on the server from the client?

I agree. Here's the link: http://aspose.com/file-tools
subject: running the application - B&S
It's not a secret anymore!