The attached test case throws an exception when run against libgcj because the null localHost argument is passed through to _Jv_bind. This test case works on Sun's JDK (presumably -- Sun's Javadocs don't document this case -- by assuming a default value in place of the null argument).
Created attachment 152712 [details] demonstrate ssl socket creation failure
I checked in a fix to gcc svn trunk and the RH 4.1 branch. Hopefully it will appear in rawhide after the next GCC build.
Should be fixed in gcc-4.1.2-9.