Java - Auto config application