java compatibility hack