<div dir="ltr"><div dir="ltr">First of all, you can set "ignore optional compile problems" on a source folder in Eclipse. In fact, these folders were set as such before the change.<div><br></div><div>But more importantly, I don't see how classes that are only used in reflection will cause a build error. If these folders are not referenced in compile time, Eclipse doesn't need them as source folders.</div><div><br></div>Jeanette, the Problems view in Eclipse has a table where it shows the problem and the resource and path from which the error originates. If you get errors because of missing OS-specific folders, it's crucial to know what reports those errors, that is, who is looking for these folders.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 15, 2022 at 8:17 PM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank">andy.goryachev@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">Kevin:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">The four classpath entries in question are<u></u><u></u></span></p>
<p>build/hlsl/Prism<u></u><u></u></p>
<p>build/gensrc/jsl-prism<u></u><u></u></p>
<p>build/hlsl/Decora<u></u><u></u></p>
<p>build/gensrc/jsl-decora<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">once added to the Eclipse .classpath file (in graphics) I see two warnings (on Mac):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p>Project 'graphics' is missing required source folder: 'build/hlsl/Decora'<span>
</span>Build path<span> </span>graphics<u></u><u></u></p>
<p>Project 'graphics' is missing required source folder: 'build/hlsl/Prism'<span>
</span>Build path<span> </span>graphics<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">For the moment I cannot verify the situation on Windows or Linux, but I think Nir mentioned that these directories might be created on Windows, so this is my current assumption.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">The problem in Eclipse is that these warnings (incomplete build path) cannot be turned off. One solution is to (re)create the missing directories manually after each [gradle clean].
The other solution is to modify gradle build to always create these directories, even if they are not used. This step is usually in ‘init’ target in the builds that utilize clean-init-build cycle.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">What could be the problem in creating empty directories?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<ul style="margin-top:0in" type="disc">
<li style="margin-left:0in"><span style="font-size:11pt">Is there a way to make it conditional?</span><span style="font-size:11pt;font-family:"Courier New""><u></u><u></u></span></li></ul>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">In theory, yes, via classpath variables:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><a href="https://stackoverflow.com/questions/495264/how-can-i-specify-an-eclipse-classpath-entry-for-specific-o-s-platform" target="_blank">https://stackoverflow.com/questions/495264/how-can-i-specify-an-eclipse-classpath-entry-for-specific-o-s-platform</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">I’ve never used this before. So far these directories are the only place where we have platform differences in the classpath.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">Could someone with a Windows machine verify that
</span>'build/hlsl/Decora'<span style="font-size:11pt;font-family:"Courier New""> and
</span>'build/hlsl/Prism'<span style="font-size:11pt;font-family:"Courier New""> are not empty please?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">Thank you<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">-andy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">openjfx-dev <<a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank">openjfx-dev-retn@openjdk.org</a>> on behalf of Kevin Rushforth <<a href="mailto:kevin.rushforth@oracle.com" target="_blank">kevin.rushforth@oracle.com</a>><br>
<b>Date: </b>Friday, 2022/07/15 at 09:51<br>
<b>To: </b><a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a> <<a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a>><br>
<b>Subject: </b>Re: Eclipse: ClassNotFoundException: com.sun.prism.shader.FillPgram_Color_Loader<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt">On 7/15/2022 9:05 AM, Andy Goryachev wrote:<u></u><u></u></span></p>
</div>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">Nir:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">So these folders are not needed to compile, but they are needed to run.
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">I suggest we bring them back to .classpath</span><u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:11pt"><br>
Is there a way to make it conditional?<br>
<br>
<br>
<u></u><u></u></span></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">and also modify build.gradle to create all 4 folders as a part of the corresponding target.</span><u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:11pt"><br>
I am not in favor of this change. There are platform-specific parts of the build, so IDEs should be able to adapt to this.<br>
<br>
-- Kevin<br>
<br>
<br>
<br>
<u></u><u></u></span></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">What do you think?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New"">-andy</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New""> </span><u></u><u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">openjfx-dev <a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank">
<openjfx-dev-retn@openjdk.org></a> on behalf of Jeanette Winzenburg <a href="mailto:fastegal@swingempire.de" target="_blank">
<fastegal@swingempire.de></a><br>
<b>Date: </b>Friday, 2022/07/15 at 03:19<br>
<b>To: </b><a href="mailto:openjfx-dev@openjdk.org" target="_blank">openjfx-dev@openjdk.org</a> <a href="mailto:openjfx-dev@openjdk.org" target="_blank">
<openjfx-dev@openjdk.org></a><br>
<b>Subject: </b>Re: Eclipse: ClassNotFoundException: com.sun.prism.shader.FillPgram_Color_Loader</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt"><br>
Zitat von Nir Lisker <a href="mailto:nlisker@gmail.com" target="_blank"><nlisker@gmail.com></a>:<br>
<br>
Hi Nir,<br>
<br>
thanks for the explanation - though I have no idea why Eclipse wants <br>
them (see them again after re-adding as source folders and all running <br>
as before).<br>
<br>
Not sure where to go from here, would prefer not to have a local <br>
classpath that differs from the one in the repository .. hmm<br>
<br>
-- Jeanette<br>
<br>
> To be more specific, FillPgram_Color_Loader.java is located under the<br>
> build/gensrc folder, which is created during the javafx setup depending on<br>
> the OS. Specifically, it's under build/gensrc/jsl-prism, which is<br>
> Windows-specific.<br>
> The change to the classpath file removed these folders from the source<br>
> folders list in the build path, so I don't know why you would get this<br>
> error. Nothing in the "main" source folders references these in compile- or<br>
> build-time.<br>
><br>
> On Fri, Jul 15, 2022 at 12:51 PM Nir Lisker <a href="mailto:nlisker@gmail.com" target="_blank">
<nlisker@gmail.com></a> wrote:<br>
><br>
>> The Eclipse project files were updated recently in<br>
>> <a href="https://github.com/openjdk/jfx/pull/804" target="_blank">https://github.com/openjdk/jfx/pull/804</a>. The OS-specific folders were<br>
>> removed. I tested it and I had no issue after this change. On what resource<br>
>> are you getting this error?<br>
>><br>
>> On Fri, Jul 15, 2022 at 12:44 PM Jeanette Winzenburg <<br>
>> <a href="mailto:fastegal@swingempire.de" target="_blank">fastegal@swingempire.de</a>> wrote:<br>
>><br>
>>><br>
>>> Hi,<br>
>>><br>
>>> after synching my master branch with upstream (has been a long while<br>
>>> since my previous update ;), I can't use the Eclipse projects (base,<br>
>>> controls, graphics are the only ones I'm keeping for change in<br>
>>> Eclipse) in another project: when running any application it's<br>
>>> throwing the stacktrace below.<br>
>>><br>
>>> My overall setup worked fine before (didn't dig yet when it started<br>
>>> not to), running the tests inside the fx projects themselves is fine,<br>
>>> though.<br>
>>><br>
>>> Looks like there is something missing (native?) related to graphics.<br>
>>><br>
>>> Where to start looking for the reason?<br>
>>><br>
>>> Stacktrace:<br>
>>><br>
>>> java.lang.ClassNotFoundException:<br>
>>> com.sun.prism.shader.FillPgram_Color_Loader<br>
>>> at<br>
>>><br>
>>> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)<br>
>>> at<br>
>>><br>
>>> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)<br>
>>> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)<br>
>>> at java.base/java.lang.Class.forName0(Native Method)<br>
>>> at java.base/java.lang.Class.forName(Class.java:332)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.d3d.D3DResourceFactory.createStockShader(D3DResourceFactory.java:426)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:269)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:500)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:369)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:919)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:620)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1526)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1112)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:852)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:754)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:92)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)<br>
>>> at<br>
>>> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)<br>
>>> at java.base/java.lang.Thread.run(Thread.java:835)<br>
>>> java.lang.InternalError: Error loading stock shader FillPgram_Color<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.d3d.D3DResourceFactory.createStockShader(D3DResourceFactory.java:432)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:269)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:500)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:369)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:919)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:620)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1526)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1112)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:852)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:754)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:92)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)<br>
>>> at<br>
>>> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)<br>
>>> at<br>
>>> javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)<br>
>>> at<br>
>>><br>
>>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)<br>
>>> at<br>
>>><br>
>>> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)<br>
>>> at java.base/java.lang.Thread.run(Thread.java:835)<br>
>>><br>
>>> -- Thanks, Jeanette<br>
>>><br>
>>><br>
>>><br>
<br>
<br>
<br>
</span><u></u><u></u></p>
</div>
</blockquote>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
</div>
</blockquote></div>
</div>