Intermediate Java Tutorial - 38 - Awesome Instant Messaging Program with Streams and Sockets
Why Stack Overflow recommends it
Stack Overflow users link it when newcomers ask how to build a basic client-server chat or socket program in Java.
Recommended by 3 people across 3 different months, 2013 to 2016.
What it is
A short Java tutorial from thenewboston's Intermediate Java series in which Bucky Roberts builds a simple instant messaging program using streams and sockets, with a Swing text field for input. It walks through a server and client that exchange messages over a socket connection.
What people said
Recommends SMD · 2013-02 · Stack Overflow · on “socket connection between my mobile Android device and my PC”
See this tutorial for setting up a TCP connection, which is probably the one you're looking for, based on Java in the PC side which might be the server or the client: Link [LINK] For more basic information about coding a client-server software you can also check this series of YouTube tutorials [this video]
Recommends user3015618 · 2013-11 · Stack Overflow · on “ActionListener not working correctly”
i just want to say that i am new to java and i am doing tuts to help me better understand and what not. now i am trying to write a program that is a Instant Messenger, the first problem is the ActionListener() it is coded right as far as i know but it just dont seem to be working. //constructor public imserver (){ super ("Justins Instant Messenger"); userText = new JTextField(); userText.setEditable(false); userText.addActionListener( new ActionListener(){ public void ActionPerformed(ActionEvent event){ sendMessage(event.getActionCommaned()); userText.setText(""); } } ); any help would be great thanks, and this is the link to the tut im using [this video]
Recommends Zulfe · 2016-04 · Stack Overflow · on “Socket streaming in java using eclipse for windows”
You've likely seen this, but Oracle provides some pretty in-depth documentation on sockets in Lesson: All About Sockets [LINK] In this series of lessons, you're shown how to read from and write to sockets in Java, thus sending data to and receiving data from the computer you're connected to. Perhaps you could start with something simple like sending audio files over LAN, then see if you can actively write audio to the socket which could then be read and played on the receiving machine. EDIT : Good 'ol Bucky has a video [this video] on building an IM program using sockets in Java which should put you at a starting point for your mock-Skype application. Best of luck!
Cites user5342366 · 2016-03 · Stack Overflow · on “Connect multiple clients to one server”
@JesseVlietveld you would need to do few more modifications to your client and server, here is a similiar example [this video]