code: public static Credentials getApplicationDefaultCredential() throws IOException {
      GoogleCredentials credentials = GoogleCredentials
          .getApplicationDefault(getHttpTransportFactory());
  
      if (credentials instanceof ServiceAccountCredentials) {
        return getJwtToken((ServiceAccountCredentials)credentials);
      }
  
      return credentials.createScoped(CLOUD_BIGTABLE_ALL_SCOPES);
    }
docs: Initializes OAuth2 application default credentials based on the environment the code is running
  in. If a service account is to be used with JSON file, set the environment variable with name
  "GOOGLE_APPLICATION_CREDENTIALS" to the JSON file path. For more details on application default
  credentials:
  <a href="https://developers.google.com/identity/protocols/application-default-credentials" >
  Application Default Credentials</a>.
  
  @return a {@link com.google.auth.Credentials} object.
  @throws java.io.IOException if any.