• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

(B&S) Clarification on requirements

 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I read my instructions concerning the deliverables and i kinda got confused on some of the tenses used and i would love clarification on the issue:
In my instructions it states 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>]

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



Now this is how i understand this:
If it is java -jar <path_and_filename> server
The program will only prompt for configuring only the server and wait for the clients to be started with the following :java -jar <path_and_filename> and then it requests for the clients configuration(i.e port number and db path).
If the command is java -jar <path_and_filename> alone It would just prompt for the db path name and connect locally. A push in the right direction will highly be appreciated.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Saheed,

If it is java -jar <path_and_filename> server
The program will only prompt for configuring only the server and wait for the clients to be started

Sounds good, but you haven't specified what "configuring the server" means to you. So you are probably right, but there are no guarantees.

clients to be started with the following :java -jar <path_and_filename> and then it requests for the clients configuration(i.e port number and db path).

If a networked client is starting up, all it needs to know is how to connect to the server. This might be as simple as just configuring the hostname / IP address of the server if you are using RMI. For Sockets you will probably have to configure the port number as well (you could set up a fixed port if you wanted to, but I personally think this is not a nice solution). Similarly you can set up a port number for an RMI solution, but RMI already has a default port (1099), so it is not necessary (but again, I personally think allowing the port number to be configured is a nice feature for RMI). But there should never be a need for the networked client to know the path to the database on the server.

If the command is java -jar <path_and_filename> alone It would just prompt for the db path name and connect locally.

Yep, this sounds perfect.

Regards, Andrew
 
pie. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic