Ah, I missed that it's during runtime. When I reviewed the PR I tested an
external project which relies on the graphics module and it worked fine. I
will try to find a case that throws this error and see what can be done.

On Fri, Jul 15, 2022 at 9:22 PM Andy Goryachev <andy.goryac...@oracle.com>
wrote:

> Nir:
>
>
>
>    1. Unfortunately, even with ”ignore optional problems” Eclipse
>    generates the “missing required source folder”.  Below are the four entries
>    I’ve added to modules/javafx.graphics/.classpath:
>
>
>
>         <classpathentry kind="src" path="build/hlsl/Prism">
>
>                 <attributes>
>
>                         <attribute name="ignore_optional_problems" value=
> "true"/>
>
>                 </attributes>
>
>         </classpathentry>
>
>         <classpathentry kind="src" path="build/gensrc/jsl-prism">
>
>                 <attributes>
>
>                         <attribute name="ignore_optional_problems" value=
> "true"/>
>
>                 </attributes>
>
>         </classpathentry>
>
>         <classpathentry kind="src" path="build/hlsl/Decora">
>
>                 <attributes>
>
>                         <attribute name="ignore_optional_problems" value=
> "true"/>
>
>                 </attributes>
>
>         </classpathentry>
>
>         <classpathentry kind="src" path="build/gensrc/jsl-decora">
>
>                 <attributes>
>
>                         <attribute name="ignore_optional_problems" value=
> "true"/>
>
>                 </attributes>
>
>         </classpathentry>       <classpathentry kind="src" path=
> "src/main/java"/>
>
>
>
>
>
>    1. The classes in build/gensrc/ generate a runtime exception, not a
>    build error.  I wonder if perhaps we should add an entry to the library
>    path instead.  Let me check on this.
>
>
>
>    1. Again, Jeanette’s report was about runtime error.  I wonder though
>    if we have / should have a file that documents where reflection is being
>    used.  (Perhaps it already exists somewhere?  Searching for “reflection”
>    turned out 4.5K hits…)
>
>
>
> What do you think?
>
>
>
> -andy
>
>
>
> *From: *Nir Lisker <nlis...@gmail.com>
> *Date: *Friday, 2022/07/15 at 11:04
> *To: *Andy Goryachev <andy.goryac...@oracle.com>, Jeanette Winzenburg <
> faste...@swingempire.de>
> *Cc: *Kevin Rushforth <kevin.rushfo...@oracle.com>,
> openjfx-dev@openjdk.org <openjfx-dev@openjdk.org>
> *Subject: *[External] : Re: Eclipse: ClassNotFoundException:
> com.sun.prism.shader.FillPgram_Color_Loader
>
> 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.
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> On Fri, Jul 15, 2022 at 8:17 PM Andy Goryachev <andy.goryac...@oracle.com>
> wrote:
>
> Kevin:
>
>
>
> The four classpath entries in question are
>
> build/hlsl/Prism
>
> build/gensrc/jsl-prism
>
> build/hlsl/Decora
>
> build/gensrc/jsl-decora
>
>
>
> once added to the Eclipse .classpath file (in graphics) I see two warnings
> (on Mac):
>
>
>
> Project 'graphics' is missing required source folder:
> 'build/hlsl/Decora'    Build path                     graphics
>
> Project 'graphics' is missing required source folder:
> 'build/hlsl/Prism'      Build path                     graphics
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> What could be the problem in creating empty directories?
>
>
>
>
>
>    - Is there a way to make it conditional?
>
>
>
> In theory, yes, via classpath variables:
>
>
>
>
> https://stackoverflow.com/questions/495264/how-can-i-specify-an-eclipse-classpath-entry-for-specific-o-s-platform
> <https://urldefense.com/v3/__https:/stackoverflow.com/questions/495264/how-can-i-specify-an-eclipse-classpath-entry-for-specific-o-s-platform__;!!ACWV5N9M2RV99hQ!LIzGSIjIMUXkp-9z2M2VFKfJBUQcWoQPJSn6doHpNKi_Zr1Tms-_bnPFrh67esgNcmElmd8oTKoXmLRcdWkg$>
>
>
>
> I’ve never used this before.  So far these directories are the only place
> where we have platform differences in the classpath.
>
>
>
> Could someone with a Windows machine verify that 'build/hlsl/Decora' and
> 'build/hlsl/Prism' are not empty please?
>
>
>
> Thank you
>
> -andy
>
>
>
>
>
>
>
> *From: *openjfx-dev <openjfx-dev-r...@openjdk.org> on behalf of Kevin
> Rushforth <kevin.rushfo...@oracle.com>
> *Date: *Friday, 2022/07/15 at 09:51
> *To: *openjfx-dev@openjdk.org <openjfx-dev@openjdk.org>
> *Subject: *Re: Eclipse: ClassNotFoundException:
> com.sun.prism.shader.FillPgram_Color_Loader
>
>
>
> On 7/15/2022 9:05 AM, Andy Goryachev wrote:
>
> Nir:
>
>
>
> So these folders are not needed to compile, but they are needed to run.
>
>
>
> I suggest we bring them back to .classpath
>
>
> Is there a way to make it conditional?
>
> and also modify build.gradle to create all 4 folders as a part of the
> corresponding target.
>
>
> 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.
>
> -- Kevin
>
>
>
>
> What do you think?
>
>
>
> -andy
>
>
>
>
>
>
>
> *From: *openjfx-dev <openjfx-dev-r...@openjdk.org>
> <openjfx-dev-r...@openjdk.org> on behalf of Jeanette Winzenburg
> <faste...@swingempire.de> <faste...@swingempire.de>
> *Date: *Friday, 2022/07/15 at 03:19
> *To: *openjfx-dev@openjdk.org <openjfx-dev@openjdk.org>
> <openjfx-dev@openjdk.org>
> *Subject: *Re: Eclipse: ClassNotFoundException:
> com.sun.prism.shader.FillPgram_Color_Loader
>
>
> Zitat von Nir Lisker <nlis...@gmail.com> <nlis...@gmail.com>:
>
> Hi Nir,
>
> thanks for the explanation - though I have no idea why Eclipse wants
> them (see them again after re-adding as source folders and all running
> as before).
>
> Not sure where to go from here, would prefer not to have a local
> classpath that differs from the one in the repository .. hmm
>
> -- Jeanette
>
> > To be more specific, FillPgram_Color_Loader.java is located under the
> > build/gensrc folder, which is created during the javafx setup depending
> on
> > the OS. Specifically, it's under build/gensrc/jsl-prism, which is
> > Windows-specific.
> > The change to the classpath file removed these folders from the source
> > folders list in the build path, so I don't know why you would get this
> > error. Nothing in the "main" source folders references these in compile-
> or
> > build-time.
> >
> > On Fri, Jul 15, 2022 at 12:51 PM Nir Lisker <nlis...@gmail.com>
> <nlis...@gmail.com> wrote:
> >
> >> The Eclipse project files were updated recently in
> >> https://github.com/openjdk/jfx/pull/804
> <https://urldefense.com/v3/__https:/github.com/openjdk/jfx/pull/804__;!!ACWV5N9M2RV99hQ!LIzGSIjIMUXkp-9z2M2VFKfJBUQcWoQPJSn6doHpNKi_Zr1Tms-_bnPFrh67esgNcmElmd8oTKoXmE8agVgz$>.
> The OS-specific folders were
> >> removed. I tested it and I had no issue after this change. On what
> resource
> >> are you getting this error?
> >>
> >> On Fri, Jul 15, 2022 at 12:44 PM Jeanette Winzenburg <
> >> faste...@swingempire.de> wrote:
> >>
> >>>
> >>> Hi,
> >>>
> >>> after synching my master branch with upstream (has been a long while
> >>> since my previous update ;), I can't use the Eclipse projects (base,
> >>> controls, graphics are the only ones I'm keeping for change in
> >>> Eclipse) in another project: when running any application it's
> >>> throwing the stacktrace below.
> >>>
> >>> My overall setup worked fine before (didn't dig yet when it started
> >>> not to), running the tests inside the fx projects themselves is fine,
> >>> though.
> >>>
> >>> Looks like there is something missing (native?) related to graphics.
> >>>
> >>> Where to start looking for the reason?
> >>>
> >>> Stacktrace:
> >>>
> >>> java.lang.ClassNotFoundException:
> >>> com.sun.prism.shader.FillPgram_Color_Loader
> >>>         at
> >>>
> >>>
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
> >>>         at
> >>>
> >>>
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> >>>         at
> java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> >>>         at java.base/java.lang.Class.forName0(Native Method)
> >>>         at java.base/java.lang.Class.forName(Class.java:332)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.d3d.D3DResourceFactory.createStockShader(D3DResourceFactory.java:426)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:269)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:500)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:369)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:919)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:620)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1526)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1112)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:852)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:754)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)
> >>>         at
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
> >>>         at
> >>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:92)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> >>>         at
> >>>
> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
> >>>         at
> >>> javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
> >>>         at java.base/java.lang.Thread.run(Thread.java:835)
> >>> java.lang.InternalError: Error loading stock shader FillPgram_Color
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.d3d.D3DResourceFactory.createStockShader(D3DResourceFactory.java:432)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:269)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:500)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:369)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:919)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:620)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1526)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1112)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:852)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:754)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)
> >>>         at
> >>>
> javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
> >>>         at
> >>> javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:92)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> >>>         at
> >>>
> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
> >>>         at
> >>> javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> >>>         at
> >>>
> >>>
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> >>>         at
> >>>
> >>>
> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
> >>>         at java.base/java.lang.Thread.run(Thread.java:835)
> >>>
> >>> -- Thanks, Jeanette
> >>>
> >>>
> >>>
>
>
>
>
>

Reply via email to