Usually, you can do this by creating resource folder in the same directory where your .jar file is. Now you can use relative path and pick each file and store files back to the resources folder. Same goes for chromedriver. You can keep all your mandatory files inside that resources folder and distribute folder as well with your JAR file. This way it can be made generic, instead of making it computer specific.