title: New defined environment varaibles can't be seen outside of WSL2?
body: <p>In WSL2, with ubuntu distro, I defined a new variable in <code>/etc/profile</code> (I also tried ~/.bashrc and /etc/environment)</p>
  <p><code>export JDK_17_0=/home/scaventz/sdk/jdk-17</code></p>
  <p>then <code>source /etc/profile</code></p>
  <p>then I try to get this variable by creating a Java Project in Windows with Intellij IDEA (The project itself is located in WSL2 of course):</p>
  <pre class="lang-java prettyprint-override"><code>public class Main {
      public static void main(String[] args) {
          String prop = &quot;JDK_17_0&quot;;
          String jdk = System.getProperty(prop);
          if (jdk == null) {
              jdk = System.getenv(prop);
          }
          System.out.println(jdk);
      }
  }
  </code></pre>
  <p>I get a null.</p>
  <p>It seems a WSL2 related issue, is there any workaround?</p>