The following only prints 8 digits: class x { static public void main( String[] args ) { System.out.println( Long.toHexString(0xffffffffffffffffL) ); } }
Could you give us the version of Classpath you use and the compiler and VM? I tried with the current CVS version of Classpath with jikes 1.16 and Kissme from CVS and with gcj-3.1 (which uses the same Long class) and both print the correct number (16) of 'f's.
OK. Tried with Classpath 0.04 and the bug is in that version. But it has already been fixed in CVS by Tom Tromey so if you need the bug fix you might want to get the file Long.java from CVS: http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/lang/Long.java (has a download link) Jikes can be found through http://www.jikes.org/, gcj is distributed with the Gnu Compiler Collection (gcc), more info can be found at http://gcc.gnu.org/java/