java version of some programs