type fix for java api env