Welcome to Dream.In.Code
Getting Java Help is Easy!

Join 136,408 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,451 people online right now. Registration is fast and FREE... Join Now!




Client-server programming

 
Reply to this topicStart new topic

Client-server programming, Reply Please!

dushi
27 Aug, 2008 - 04:09 PM
Post #1

New D.I.C Head
*

Joined: 23 Feb, 2008
Posts: 39



Thanked: 1 times
My Contributions
Hello,
I want to ask a question.
I'm about to make a client-server program.

i know that first i have ta write the interface, the server implementation and the server object from the server implementation to register with the RMI. and final i have to make my application with a button.

My question is. when i begin, i make a new project. than i make e new interface file. when i finish with the interface file, can i make the server impl. and the server object to register in the same project.

i know that my application must be in an diffrent project.

I hope its clear. thnx
User is offlineProfile CardPM
+Quote Post

nick2price
RE: Client-server Programming
27 Aug, 2008 - 04:35 PM
Post #2

D.I.C Head
**

Joined: 23 Nov, 2007
Posts: 231



Thanked: 6 times
My Contributions
I suppose it wouldnt really matter. I presume that you are using somthing like Netbeans IDE when you are talking about creating a project folder? I am using JCreator and with somthing like that, i can pretty much save all files into the same workspace (even though it can be bad to do so). Depending on how big your projects going to be, sometimes people like to split the files into different folders, like for the factory class. But if u are using and ide, i really am not sure as i dont like using them. gl, and maybe someone else can tell you a more concrete answer.
User is offlineProfile CardPM
+Quote Post

dushi
RE: Client-server Programming
28 Aug, 2008 - 02:03 PM
Post #3

New D.I.C Head
*

Joined: 23 Feb, 2008
Posts: 39



Thanked: 1 times
My Contributions
no one else have an answer?
User is offlineProfile CardPM
+Quote Post

pbl
RE: Client-server Programming
28 Aug, 2008 - 02:22 PM
Post #4

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
QUOTE(dushi @ 27 Aug, 2008 - 05:09 PM) *

Hello,
I want to ask a question.
I'm about to make a client-server program.

i know that first i have ta write the interface, the server implementation and the server object from the server implementation to register with the RMI. and final i have to make my application with a button.

My question is. when i begin, i make a new project. than i make e new interface file. when i finish with the interface file, can i make the server impl. and the server object to register in the same project.

i know that my application must be in an diffrent project.

I hope its clear. thnx

I guess this is a NetBeans issue (I am not familiar with it).
Eclipse will allow use to have as many applications you want in a project.

Nothing should also stop you from starting the server from the console prompt if Netbeans does not allow multiple applications in the same project.

Or use a "main" to which you passed a parameter

CODE

public static void main(String[] arg) {
   if(arg[0].equalsIgnorecase("S"))
       new Server();
   else
       new Client();
}



Edited: the forum is calm tonigh

I just tested it in Netbeans... even if there is a "Run project" tab, under it there is a "run file" tag so you can run more than one main() in the same project

This post has been edited by pbl: 28 Aug, 2008 - 06:04 PM
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Client-server Programming
29 Aug, 2008 - 12:50 AM
Post #5

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
NetBeans allows you to have as many applications, main classes whatever in a project as many you wish. However you can only specify one parametrized run command in the IDE for an application(you can start the other main classes without parameters), however you can create custom ant files to have several parametrized run commands. I hope it makes sense ohmy.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:10PM

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month