Programming

So I got a JFrame app the other day for a plugin on a program. I found out how to change variable values in a text file without a recompile of the java class. Here it is (I did not include the preliminary java declarations/import classes, but they must also be included as usual).

The var declare portion of app.java file

The config.txt file

After compiling the java file (cmd “javac app.java”), you will be able to change the initial value of varName by changing the value of WindowWidth in the text file. It works great!!

Leave a Reply

Your email address will not be published. Required fields are marked *