updated native java code.