*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: Standalone/Remote mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: Standalone/Remote mode" Watch "NX: Standalone/Remote mode" New topic
Author

NX: Standalone/Remote mode

Priscilla Tan
Greenhorn

Joined: Feb 05, 2004
Posts: 2
Hi Experts,
In the URLyBird 1.2.3 assignment, there are 3 command modes
java -jar <path_and_filename> [mode]
where mode can be server, alone or "left out entirely".
Question 1:
For the non-networked mode, do i jus use the alone mode only to run the program? I do not need to execute the "left out entirely" mode in the non-networked mode right?
Question 2:
As for the network mode, i need to execute both the server and "left out entirely" mode in order for the program to run?
Please help me, thank you very much!
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
I think It will look something like this depending on how you set it all up
public static void main (String[] arg)
if(args[0].equals("alone"){
new ClientUI()
new LocalClientServices(); //Also start database
}
else if(args[0].equals("server"){
new Server() //Also DB started by server
}
else{
new ClientUI()
new RemoteClientServices();// Connect to Server.
}


SCJP<br />SCJD
Behnam Gohari
Greenhorn

Joined: Feb 06, 2004
Posts: 2
Mark,
Originally posted by Mark Smyth:

else if(args[0].equals("server"){
new Server() //Also DB started by server
}

What is your interpretation of Server here? What does Server() start up?
Is it just the database or is it more....?
Thanks,
Behnam
[ February 06, 2004: Message edited by: Behnam Gohari ]
George Marinkovich
Ranch Hand

Joined: Apr 15, 2003
Posts: 619
Hi Behnam,
Originally posted by Behnam Gohari:
What does Server() start up?
Is it just the database or is it more....?

The database needs to be started, of course. But also, if you're using RMI for your network communications solution, you probably want to register your remote database object with the RMI registry, so that network clients can lookup this remote database object and access your database.
I'm not Mark, but hope this helps anyway.
George
[ February 06, 2004: Message edited by: George Marinkovich ]

Regards, George
SCJP, SCJD, SCWCD, SCBCD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11432
    
  85

Hi Pris cilla
Welcome to JavaRanch.
We don't have many rules here, but one we do have is the JavaRanch Official Policy on Displayed Names. According to that policy your displayed name should be a real name. Could you please update your profile to display your real name? You can change it here
Thanks, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Behnam Gohari
Greenhorn

Joined: Feb 06, 2004
Posts: 2
Originally posted by George Marinkovich:

I'm not Mark, but hope this helps anyway.
George
[ February 06, 2004: Message edited by: George Marinkovich ]

Thanks George. It all makes sense now...
Greetz,
Behnam
Priscilla Tan
Greenhorn

Joined: Feb 05, 2004
Posts: 2
Thanks. I understand how to do my work!
Fred Beltr�o
Greenhorn

Joined: Feb 24, 2005
Posts: 10
Originally posted by Andrew Monkhouse:
Hi Pris cilla

Welcome to JavaRanch.

We don't have many rules here, but one we do have is the JavaRanch Official Policy on Displayed Names. According to that policy your displayed name should be a real name. Could you please update your profile to display your real name? You can change it here

Thanks, Andrew


I did not understand why her name is not according the policy. What is wrong with the name Priscilla Tan?

Best regards,

Fred


Fred Beltr�o<br />SCJA<br />SCJP 1.4<br />SCJD (in progress)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: NX: Standalone/Remote mode