I have developed an application in netbeans. The main purpose is to send chat meassages which are either in hindi, english or special characters over socket.
The problem is that whenever I run the application through netbeans it works fine but if I try to run the jar without running netbeans then english text is shown properly on client side but hindi text is shown as ???????? (question marks).
1. I am using print() of PrintStream for sending and read(bytes  b) of DataInputStream to receive message
2. There are two applications client and server.
3. All clients connect to server then clients communicate with each other by sending messages to server and server then forwards those messages to appropriate client.
please help me....
This is just a character set problem. You need to specify the correct character sets when constructing your Readers, Writers, and any Strings you are building out of the bytes you receive. The one thing that it isn't is anything to do with the sockets, TCP, etc. This is just a bytestream.