Java implementation of pythia