problem: I have a string containing special characters which i convert to bytes and vice versa..the conversion works properly on windows but on linux the special character is no
You should make the conversion explicitly:
byte[] byteArray = "abcd".getBytes( "ISO-8859-1" );
new String( byteArray, "ISO-8859-1" );
EDIT:
It seems that the problem is the encoding of your java file. If it works on windows, try compiling the source files on linux with javac -encondig ISO-8859-1
. This should solve your problem.