Eclipse: ClassNotFoundException: com.sun.prism.shader.FillPgram_Color_Loader

Andy Goryachev andy.goryachev at oracle.com
Fri Jul 15 17:17:02 UTC 2022


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

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-retn at openjdk.org> on behalf of Kevin Rushforth <kevin.rushforth at oracle.com>
Date: Friday, 2022/07/15 at 09:51
To: openjfx-dev at openjdk.org <openjfx-dev at 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-retn at openjdk.org><mailto:openjfx-dev-retn at openjdk.org> on behalf of Jeanette Winzenburg <fastegal at swingempire.de><mailto:fastegal at swingempire.de>
Date: Friday, 2022/07/15 at 03:19
To: openjfx-dev at openjdk.org<mailto:openjfx-dev at openjdk.org> <openjfx-dev at openjdk.org><mailto:openjfx-dev at openjdk.org>
Subject: Re: Eclipse: ClassNotFoundException: com.sun.prism.shader.FillPgram_Color_Loader

Zitat von Nir Lisker <nlisker at gmail.com><mailto:nlisker at 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 <nlisker at gmail.com><mailto:nlisker at gmail.com> wrote:
>
>> The Eclipse project files were updated recently in
>> https://github.com/openjdk/jfx/pull/804. 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 <
>> fastegal at swingempire.de<mailto:fastegal at 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
>>>
>>>
>>>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20220715/0f421ee3/attachment-0001.htm>


More information about the openjfx-dev mailing list