Reimplementation of Scopt int Java