A recent commit to javatoolkit marked it as compatible with python2.7 but it is not. Emerge will fail when building for python2.7. This URL contains an updated javatoolkit with python2 compatibility removed from PYTHON_COMPAT, python3.7 fixes added from bug #667500, and a get_libdir fix as well.
Note that this is for 0.6.0.
0.6.1 just compiled fine for me with all supported python versions. is the issue still valid?
if the problem persists, please re-open this bug. it might be that the issue has been fixed in the meantime as i cannot reproduce it.