Yes, there is a way to load the Json credential file from Java applications.
Please refer the below code snippet to create the Pipeline object with the Google credential reference loaded programmatically.
//create scope list with DataFlow's scopes
Set<String> scopeList = new HashSet<String>();
scopeList.addAll(DataflowScopes.all());
//create GoogleCredentials object with Json credential file & the scope collection prepared above
GoogleCredentials credential = GoogleCredentials
.fromStream(new FileInputStream("path-to-credential-json-file"))
.createScoped(scopeList);
//create default pipeline
PipelineOptions options = PipelineOptionsFactory.create();
//assign the credential
options.as(GcpOptions.class).setGcpCredential( credential);
Pipeline pipeLine = Pipeline.create(options);
This approach might help you not to depend on the GOOGLE_APPLICATION_CREDENTIALS environment variable.
It has worked on my environment, please let me know if you hit any issues with this.