<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">On 04/08/2022 01:33, <a class="moz-txt-link-abbreviated" href="mailto:eric@kolotyluk.net">eric@kolotyluk.net</a>
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:002801d8a799$cf5d9040$6e18b0c0$@kolotyluk.net">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}code
        {mso-style-priority:99;
        font-family:"Courier New";}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Has anyone had any success using Structured
          Concurrency from JDK 19?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have the following pom.xml<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="background:#2B2B2B"><span style="font-size:10.0pt;font-family:"Courier
            New";color:#E8BF6A;mso-fareast-language:EN-CA"><plugin><br>
                <artifactId></span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#A9B7C6;mso-fareast-language:EN-CA">maven-compiler-plugin</span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#E8BF6A;mso-fareast-language:EN-CA"></artifactId><br>
                <configuration><br>
                    <compilerArgs></span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#A9B7C6;mso-fareast-language:EN-CA">--source
            19</span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#E8BF6A;mso-fareast-language:EN-CA"></compilerArgs><br>
                    <compilerArgs></span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#A9B7C6;mso-fareast-language:EN-CA">--enable-preview</span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#E8BF6A;mso-fareast-language:EN-CA"></compilerArgs><br>
                    <compilerArgs></span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#A9B7C6;mso-fareast-language:EN-CA">--add-modules
            jdk.incubator.concurrent</span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#E8BF6A;mso-fareast-language:EN-CA"></compilerArgs><br>
                </configuration><br>
            </plugin></span><span style="font-size:10.0pt;font-family:"Courier
            New";color:#A9B7C6;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">But when I try to compile the project, I
          get<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New"">[ERROR]
/C:/Users/ERIC/Documents/git/loom-lab/laboratory/src/main/java/net/kolotyluk/loom/Structures.java:[3,21]
            package jdk.incubator.concurrent is not visible<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New"">[ERROR]   (package jdk.incubator.concurrent is
            declared in module jdk.incubator.concurrent, which is not in
            the module graph)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New""><o:p> </o:p></span></p>
        <p class="MsoNormal">And I have been trying for over an hour to
          fix this but cannot find any solutions that work as they all
          indicate “<code><span style="font-size:10.0pt">--add-modules
              jdk.incubator.concurrent</span></code>” should work.<o:p></o:p></p>
        <br>
      </div>
    </blockquote>
    This works for me:<br>
    <br>
              <compilerArgs><br>
               
    <arg>--add-modules=jdk.incubator.concurrent</arg><br>
                <arg>--enable-preview</arg><br>
              </compilerArgs><br>
    <br>
    -Alan<br>
    <br>
    <br>
  </body>
</html>