• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

want to run my swing application on local area network?

 
Jatin sachdev
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to run my application on my college network.
please help me in this regard

I dont know network programming.I have heard that it requires RMI.

How ???
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing has nothing to do with RMI. Where do you see the connection to network programming - what does the app do?

And no, network access in a java app does not imply RMI; there are many other ways to do that, like HTTP or raw TCP sockets.
 
Jatin sachdev
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know about this.

I only want my swing application to run on LAN. For e.g

I have 2 computers connected through LAN. I want to send something to 2nd computer and second in turn replies back.
Kind of client server in which one sends other responds.......
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Swing apps (like all Java apps) can communicate via TCP sockets over a network. The Java Tutorial can teach you all about that: http://download.oracle.com/javase/tutorial/networking/sockets/index.html
 
Joe Ess
Bartender
Posts: 9256
9
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think RMI is easier to work with than sockets because you don't have to deal with all the low-level details of sockets and protocols.
The RMI tutorial is here.
 
Jatin sachdev
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think RMI is easier to work with than sockets because you don't have to deal with all the low-level details of sockets and protocols.
The RMI tutorial is here.


Thank you Joe.

Please give me one suggestion

Suppose I have 2 set of codes--one is Socket based other is in JSP.
In my college there is a LAN.Every single computer is connected through it.

I want:-
A person on 3rd floor (Client- i.e. Socket) to have access to database on ground floor(Server-i.e ServerSocket).Is it possible ?
Server does not know the IP address of the Client in this case. please tell


Other thing is:
I want my JSP code to be visible to every computer in LAN.How to do that???
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having a JSP implies that there's an HTTP server (with a servlet container) running - in a normal environment that would be visible on the LAN under the IP address of the machine running the server without anything special needing to be done; is it not?
 
Joe Ess
Bartender
Posts: 9256
9
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jatin sachdev wrote:[.
I want:-
A person on 3rd floor (Client- i.e. Socket) to have access to database on ground floor(Server-i.e ServerSocket).Is it possible ?
Server does not know the IP address of the Client in this case. please tell


The details of connecting two comptuers via a network have little to do with the physical location of the server. If they are on the same network (as you indicate) you should be able to connect.
Sockets are persistent two-way connections, so the server does not have to know the IP address of the client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic