fix runtime error on openjdk