Hello, I am developing an application, which will be executed from a USB, but as the absolute path of a USB can vary depending on the equipment, whether it is in D:\
or F:\
ect, ect. I need to know how to get the location where the jar was executed.
at the beginning I put it in the following way
File sample_file = new File ("D: \ example.txt");
but you can imagine what happened when I run it on another computer. Any solution?