Project for Continous Integration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
649 B

  1. import java.io.FileReader;
  2. import java.util.Arrays;
  3. import java.util.Properties;
  4. public class BordComputer {
  5. String[] deviceNames;
  6. public void readConfig() {
  7. try (FileReader reader = new FileReader("Geraete.config")) {
  8. Properties properties = new Properties();
  9. properties.load(reader);
  10. String[] values = properties.values().toArray(new String[0]);
  11. Arrays.sort(values);
  12. deviceNames = new String[values.length];
  13. System.arraycopy(values, 0, deviceNames, 0, properties.size());
  14. } catch (Exception e) {
  15. e.printStackTrace();
  16. }
  17. }
  18. }