added native java support