Implementing java methods in native world