0

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?

Community
  • 1
  • 1
H. Altus
  • 11
  • 3

1 Answers1

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,532
  • 1
  • 20
  • 31