I have a simple java project in eclipse. The main(String[] args) method of this project takes an argument. Argument to main(String[] args) method is provided inside the 'Program Arguments' text box of 'Arguments' tab of 'Run Configurations' window (Main Class -> Run As -> Run Configurations ->Arguments -> Program Arguments). I want to convert this project into .exe file such that it can read argument from a specific file. On double clicking .exe file, the program should read argument from the specific file and execute the application.
I don't want to hard code the location of file name inside the application because this .exe file will run on many machines, so file path of the this file will change on every machine. Also user is allowed to change the argument inside the file. So I believe that this file should be outside the .exe file but somehow .exe file can read this file.
Is there any way to achieve it? If this is possible, then, how it could be done. Also what should be the extension of this file (.txt or something else).