Porting native lib logic into Java. Native access from console.