Skip to content

Instantly share code, notes, and snippets.

@kasimok
Created June 15, 2016 08:57
Show Gist options
  • Save kasimok/d275c1b895a472d759fd9e419036bcf5 to your computer and use it in GitHub Desktop.
Save kasimok/d275c1b895a472d759fd9e419036bcf5 to your computer and use it in GitHub Desktop.
Load File in resources folder
//Get file from resources folder
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource("certs/root/ca-key.pkcs8").getFile());
return readPrivateKey(file.getPath());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment