Have the java program accept parameters, either via command line input (eg main(String[] args) ), a GUI (Swing?), or a config file.