There is a class that is a wrapper for the Properties class that was conceived for accessing the values of the config.properties which is inside the jar of the project itself:
public class Prop { public static final String EMAIL = "mail"; public static final String PASS = "password"; public static final String RECIPENTS = "recipents"; public static final String FIO = "fio"; public static final String USER = "user"; public static final String EMAIL_JIRA = "mailJira"; public static final String PASS_JIRA = "passwordJira"; private Properties properties; private Reader reader; public Prop() { properties = new Properties(); try { reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("config.properties"), "utf-8")); } catch (Exception e) { e.printStackTrace(); } try { properties.load(reader); } catch (Exception e) { e.printStackTrace(); } } public String get(String key) { return properties.getProperty(key); } public void set(String key, String value) { properties.setProperty(key, value); } } How can I change the data inside the config.properties using the setProperty() method? As far as I understand, you need to work with the object of the Properties class, which before editing we store() (load). But how then to get or create an OutputStreamWriter by analogy with InputStreamReader , and the getResourcesAsStream() method