Submitted by GeePee on Monday, April 27, 2015 - 23:12.
This tutorial is on how to begin with Networking Programming in Java.
Kryonet is the library which I will be using for this mini series of networking programming in Java. It is a great library with easy to use functions and good error handling built in.
First we need to download Kryonet, to do this, go to Google and type in Kryonet and a Github link will appear (or just click hereL https://github.com/EsotericSoftware/kryonet) next click the Download ZIP button on the right hand side of the page.
You will be greeted with a zip file full of the source code required. You may also need to download and install Winrar/Winzip before you are able to open the file.
Now open your Java IDE, I use Eclipse - it's free, and create a new Java Project. Once you have done that, click on the java project image within your file explorer and create a new folder named "libs".
Now, go to the ZIP folder you downloaded earlier and open the "build" folder, drag the entire contents in to the newly created libs folder. Ensure you click Copy Files on the prompt that shows up. Next go back to the main root folder of the ZIP file, go in to the "libs" folder and drag and drop the entire contents from there in to your libs folder also.
Next, open the "src" folder within the ZIP file and copy the entire "com" folder in to your src folder that is automatically created in your Java Project - at least, it is in Eclipse. That should generate about three packages full of information.
Finally we have to import the jars in to the java project, to do this right click on your java project and go to:
Java Build Path
Then navigate to your libs folder you created earlier and imported the JARs to from the ZIP file/folder. Select the top JAR file, hold down shift and click on the bottom JAR file to select them all, click ok and ok on the main properties window.
You should now have no errors on your project and you should be ready to go to the next tutorial. See you there!