Results 1 to 6 of 6
Thread: basic Server Networking
- 05-20-2011, 03:19 AM #1
basic Server Networking
Hello I am new to creating servers and generally networking in Java. I want to discuss the process of how to host a java server on the net. I know that you need more than just simple file hosting but are there any online resources that could shed some light on the subject. My eventual plan is to create a chess game that sends data across the web to two different players. then maybe move onto a more action based game.<Daniel>P.</Berry>
- 05-20-2011, 09:21 PM #2
- 05-21-2011, 12:49 AM #3
What ra4king said. Plus, you also might want to read up on serialization, particularly Object streams. The state of a chess game seems like a prime candidate for the simplicity of Java's serialization mechanism.
Depending on how your ISP and home/office/school networks are set up, you might be able to host the server yourself. But that's a pretty involved discussion, and pretty off-topic for this forum.Get in the habit of using standard Java naming conventions!
- 05-21-2011, 01:22 AM #4
What's important first is that he learns how to use blocking TCP sockets, non-blocking TCP channels, and non-blocking UDP channels. He also needs to learn java.io for blocking sockets and java.nio for non-blocking channels.
- 05-23-2011, 02:07 AM #5
Thanks for the links but do you know a good free program that would allow me to host a java server online or o n my computer for sending data across the network.<Daniel>P.</Berry>
- 05-23-2011, 02:39 AM #6
You don't need any special program to host a Java server on your own computer - just the JRE. The problem is routing connections to it. Again, that depends on how your computer is connected to the Internet. The simplest scenario is if your computer is connected directly to your Internet connection, and has its own public IP address. The most complicated scenario is if your computer is connected to the Internet via a school or corporate network, and has a private (non-routeable) IP address. This tutorial is about Web servers, but the second and third sections sound like they'd be applicable to any type of server.
Hosting a Java server somewhere else on the Internet would probably require paying for dedicated hosting. Running Java apps isn't a service you're likely to find from a free site, or even a commercial shared hosting site.Get in the habit of using standard Java naming conventions!
- By PhQ in forum NetworkingReplies: 7Last Post: 07-24-2010, 11:56 PM
- By mr_anderson in forum NetworkingReplies: 1Last Post: 07-11-2010, 09:18 PM
- By Psyclone in forum NetworkingReplies: 1Last Post: 03-06-2010, 01:49 AM
- By Psyclone in forum AWT / SwingReplies: 1Last Post: 02-26-2010, 04:41 AM
- By JDCAce in forum NetworkingReplies: 7Last Post: 10-10-2008, 08:29 PM