Seperation of java and c implementation