title: Setting GCP environment variable in Spring boot with vs code
body: <p>I'm trying to set up GOOGLE_APPLICATION_CREDENTIALS but keep getting this error </p>
  
  <blockquote>
    <p>java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credential</p>
  </blockquote>
  
  <p>I have defined in my application properties:</p>
  
  <pre><code>spring.cloud.gcp.project-id=PROJECT_ID
  spring.cloud.gcp.credentials.location=lasspath:/src/main/resources/key.json
  </code></pre>
  
  <p>Added the dependency in the pom file:</p>
  
  <pre><code> &lt;dependency&gt;
       &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
       &lt;artifactId&gt;google-cloud-dialogflow&lt;/artifactId&gt;
       &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;/dependency&gt;
  </code></pre>
  
  <p>Tried to do it from the terminal(windows) as well no luck:</p>
  
  <pre><code>&gt; set GOOGLE_APPLICATION_CREDENTIALS="C:\Users\user\Desktop\****\******\src\main\resources\key.json"
  </code></pre>