Skip to content
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

skija.dll: Can't find dependent libraries #149

Open
clqsrc opened this issue Dec 7, 2022 · 2 comments
Open

skija.dll: Can't find dependent libraries #149

clqsrc opened this issue Dec 7, 2022 · 2 comments

Comments

@clqsrc
Copy link

clqsrc commented Dec 7, 2022

Hi:

I run in vps server windows server 2012

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Administrato
r\AppData\Local\Temp\skija_0.93.6\skija.dll: Can't find dependent libraries
at java.base/java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2614)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2499)
at java.base/java.lang.Runtime.load0(Runtime.java:812)
at java.base/java.lang.System.load(System.java:1821)
at org.jetbrains.skija.impl.Library.load(Library.java:73)
at org.jetbrains.skija.impl.Library.staticLoad(Library.java:47)
at org.jetbrains.skija.Surface.(Surface.java:9)
at com.javasrc.map.map.t3(map.java:166)
at http_main.main(http_main.java:33)


public static void t3()
{
//org.jetbrains.skija.windows.LibraryFinder;
//https://github.com/JetBrains/skija/blob/master/docs/Getting%20Started.md
Surface surface = Surface.makeRasterN32Premul(100, 100);
Canvas canvas = surface.getCanvas();

    Paint paint = new Paint();
    paint.setColor(0xFFFF0000);


    canvas.drawCircle(50, 50, 30, paint);

    //--------------------------------------------------------
    Image image = surface.makeImageSnapshot();
    Data pngData = image.encodeToData(EncodedImageFormat.PNG);

    //-- 0.89.8
    byte [] buf = pngData.getBytes();
    ByteBuffer pngBytes = ByteBuffer.wrap(buf);
    //--


    

    try
    {
        File file = new File("d:\\filename.png");

        boolean append = false;

        FileOutputStream fs = new FileOutputStream(file, append);

        FileChannel wChannel = fs.getChannel();

        //wChannel.write(bbuf);
        wChannel.write(pngBytes);

        wChannel.close();
        fs.close();


    }
    catch (Exception e)//(IOException e) 
    {
        System.out.println(e);
    }

}//

Do need to install any libraries? Please help me.

@tonsky
Copy link
Collaborator

tonsky commented Dec 7, 2022

I’m not sure if we can run on Windows 2012. I think we require DX12 and 64 bit at least

@istinnstudio
Copy link

Cross link to a similar post, with a feature request for DirectX12/OpenGL dll separation: HumbleUI/Skija#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants