My project structure is:
Project
src
main
java
youtube
ApiExample.java
resources
client_secret.json
I am trying to use the code sample for getting videos from a playlist using the youtube data api. I keep getting a nullPointerException indicating Inputstream can't find the file but I am not sure how to access it. I am also using maven for the dependencies.
private static final String CLIENT_SECRETS= "client_secret.json";
InputStream in = ApiExample.class.getResourceAsStream(CLIENT_SECRETS);
GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));