LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-06-2006, 12:02 PM   #1
gloveny
LQ Newbie
 
Registered: Jul 2006
Posts: 24

Rep: Reputation: 15
Run a java socket server


Hi can anyone point me in the direction of some documentation.

My program is just a simple socker server. Linux = 2.6
I have to code, I just need to know the basics like where to put it on my server so client applets can connect to it, and how to start the server.
Thank you
 
Old 12-07-2006, 09:55 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,131

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Just run the code. Make sure that your firewall allows traffic to/from whatever port your server is listening on. I am assuming you just need to start it once, not on every reboot.
 
Old 12-08-2006, 05:39 AM   #3
gloveny
LQ Newbie
 
Registered: Jul 2006
Posts: 24

Original Poster
Rep: Reputation: 15
My questions was were to put the socket server on my server. In which folder. I am a complete beginer and have very little Linux knowledge.

So,
1) which folder should I put it in to be avaliable to only one particular domain name?

2) where to put t to be avaliable to all my domains on the server?

3) how do i start it?

4) how to I stop it?

5) how can I see the out put, like on a windows computer I can run it and a command window type thing opens and I can see the system.out's. How can I do this on a Linux server, bearing in mind my only access is SSH?

Thanks, complete noob.
 
Old 12-08-2006, 05:55 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by gloveny
My questions was were to put the socket server on my server. In which folder. I am a complete beginer and have very little Linux knowledge.

So,
1) which folder should I put it in to be avaliable to only one particular domain name?
domain name ?
The folder (directory) where a program sits has no relation whatsoever with that.
Quote:
2) where to put t to be avaliable to all my domains on the server?
Same as the above.
Quote:
3) how do i start it?
java <something>
Quote:
4) how to I stop it?
That depends on how it is written, in last case, kill <process-id> should work.
Quote:
5) how can I see the out put, like on a windows computer I can run it and a command window type thing opens and I can see the system.out's. How can I do this on a Linux server, bearing in mind my only access is SSH?
The output of a socket server usually goes to its clients, please be more specific about what output you are talking about.
 
Old 12-10-2006, 11:14 AM   #5
gloveny
LQ Newbie
 
Registered: Jul 2006
Posts: 24

Original Poster
Rep: Reputation: 15
jlliagre, thanks for your reply.
When I say out put I mean simple system.outs to the consol window so I can debug my java socket server. I'd liek to just develop it locally and then upload it but ho many programs work first time after you moved its location.
I've only just got used to login in via SSH and perhaps running few commands like getting a password or somthing. I want to be able to start the server and then watch or capture the system.out's. I could always write them to a file instead if its not possible.

Thanks
 
Old 12-10-2006, 02:07 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,131

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can put the server anywhere and then start it with "java <programname>" anything you write to standard output (e.g. with system.out.println) will be printed onto your console. Running your server with the java command is just like running any other command in Linux -- anything going to the standard output is written to the terminal unless you redirect it somewhere else.
 
Old 12-11-2006, 07:38 AM   #7
gloveny
LQ Newbie
 
Registered: Jul 2006
Posts: 24

Original Poster
Rep: Reputation: 15
ok guys, thanks for all the replies. That should get me going.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple connections on one socket? (Java) smoothdogg00 Programming 2 04-09-2006 09:15 PM
connection between java socket and unix socket sathishkumar Programming 1 01-10-2006 03:21 PM
cannot read data at server socket, though client socket sends it jacques83 Linux - Networking 0 11-15-2005 01:58 PM
how to run programs through a socket jostre11 Programming 6 11-02-2004 03:53 PM
can't run java RMI server DrDan Linux - Networking 0 02-27-2004 08:43 AM


All times are GMT -5. The time now is 08:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration