This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Are you sure the problem is in your Java program? Try writing a short shell script that captures the return value and prints it (so there's no Java involved at all). Can you get values greater than 128?
"I'm not back." - Bill Harding, Twister
Anil kumar P
Joined: Jan 16, 2008
The shell script is returning value as 255 only. But the java programme is returning as -1.
If the return value is less than 128, then java is also returning correctly as 128.