I had several problems with this Java Bug . Finally I found the solution so im gonna write it down ( For Gentoo Users )
1) Emerge x11-libs/libxcb-1.1
Check out the final message after the emerge
* libxcb-1.1 adds the LIBXCB_ALLOW_SLOPPY_LOCK variable to allow
* broken applications to keep running instead of being aborted.
* Set this variable if you need to use broken packages such as Java
* (for example, add LIBXCB_ALLOW_SLOPPY_LOCK=1 to /etc/env.d/00local
* and run env-update).
That solved my problems for most of java programs that couldnt start at all