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 |
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.
|
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. |
Quote:
The folder (directory) where a program sits has no relation whatsoever with that. Quote:
Quote:
Quote:
Quote:
|
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 |
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.
|
ok guys, thanks for all the replies. That should get me going.
|
All times are GMT -5. The time now is 10:45 PM. |