settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator);
int cfc; settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator);  checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with the -Duser.home=<your home dir> parameter\n" + "to avoid this question popping up all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); }
   private void checkLegacy() {      // we check if the sessions file already exists in the directory      // if it does exist we are working with an old install so we      // need to set the settings directory to the users directory      // SESSIONS is declared as a string, so we just can use the keyword here.      File ses = new File(SESSIONS);      if(ses.exists()) {         settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator);      }      else {         settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j"  + File.separator);         System.out.println("User Home = " + System.getProperty("user.home"));      }   }