-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Native Image] ClassNotFoundException #9930
Comments
@Ferrarisrex Help us help you with a small reproducer, an application you can share that demonstrates this behavior. You most definitely need libraries from the GraalVM distro, not anything pulled from Java 1.8. |
I can not reproduce the error without the code I already made, so I do not know |
I tried fixing it by just copying the format of the other shaders in reflect-config.json, but that results in a InvocationTargetExcaption |
I tried it differently, doing: |
if I do -H:IncludeResources=".*" it works, but the file size is huge, but if i do -H:IncludeResources="com.sun.prism.shader.Mask_TextureSuper_Loader.class" it does not work |
Did you try building your native-image from a jar-with-dependencies? |
i did do that |
i did find a workaround, you must do the following: and in your pom.xml you must add: this does seem to work for other missing classes of the same flavor, such as com.sun.prism.shader.Solid_Color_Loader, just change the name in reflect-config.json |
Describe the Issue
I package and compile the jar using the maven native image plugin, and the output works fine on the computer that compiled it, even if i change the executables directory, however, if i put it on a different computer, I get
java.lang.ClassNotFoundException: com.sun.prism.shader.Mask_TextureSuper_Loader
i did bring all the DLL files with it, and the target computer has java 1.8
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
java version "21.0.4" 2024-07-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41, mixed mode, sharing)
Operating System and Version
Windows 10 22h2
Diagnostic Flag Confirmation
-H:ThrowMissingRegistrationErrors=
flag.Run Command
image.exe
Expected Behavior
to finish running
Actual Behavior
opens a menu, and then has the above error constantly reoutputted to the command prompt and does not continue
Steps to Reproduce
Additional Context
No response
Run-Time Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: