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.
Look into the java.net, java.nio, and java.nio.channels packages. For tutorials, you can always check out Sun's Java Sockets tutorials.
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.
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.
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.
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.