I have a code that runs routines inside Linux servers and I access using public keys. When the project is in my pc (development), everything works because in the code I specify the location of the key that is in my machine, but when generating a jar (package for store) and running on another computer, the program does not find this key .
I have already put the key inside the src / myProject folder and I made reference to the file and locally it worked, but in another machine it did not.
I researched getresources but still could not.
I refer to the file as any string:
String privateKey = "Diretorio\id_dsa.ppk";
What would be the correct way to attach this key to my project so that it runs on any machine?