Finished port for jnibwapi, first successfull run.