HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
570 stars 46 forks source link

Exception in thread "main" java.lang.NoClassDefFoundError: sun.misc.Cleaner #273

Closed Hilal-Anwar closed 11 months ago

Hilal-Anwar commented 1 year ago

Exception in thread "main" java.lang.NoClassDefFoundError: sun.misc.Cleaner at io.github.humbleui.skija.impl.Cleanable.(Cleanable.java:19) at io.github.humbleui.skija.impl.Managed.(Managed.java:20) at io.github.humbleui.skija.impl.Managed.(Managed.java:10) at io.github.humbleui.skija.impl.RefCnt.(RefCnt.java:7) at io.github.humbleui.skija.Typeface.(Typeface.java:394) at io.github.humbleui.skija.FontMgr.matchFamilyStyleCharacter(FontMgr.java:109) at org.jwm.Example.(Example.java:17) I am getting this error when I built and ran the jar file. I do not get this error when I run this on class path. I am running the code in https://github.com/HumbleUI/JWM/tree/main/examples/dashboard/java i am using java 21

tonsky commented 1 year ago

I guess you build the jar file wrong?

Hilal-Anwar commented 12 months ago

You are right it was my mistake I was making jar using maven assembly plugin and the jar was not working properly. On using spring plugin it is now working fine. I have one more question on running it on class path the app icon is shown but it not shown when running the jar file.

Screenshot 2023-10-05 125946 uiyut

On running with jar file.

yteye

Path location. Screenshot 2023-10-05 130829

tonsky commented 11 months ago

Yeah, it requires an actual file on disk right now. If you package it as a jar, file will be compressed inside