I have a JAR file that I set to run when Windows starts per this question but I have a .cfg file I need to load. Is there an argument I can add to do this automatically?
Asked
Active
Viewed 638 times
1 Answers
0
You can add it right into your code:
File configFile = new File("path/to/file.cfg");
or get from console, for example from first argument of your programm:
File configFile = new File(args[0]);
Aleksandr Podkutin
- 2,393
- 1
- 16
- 29