Skia Graphics Library as a renderer in Processing

I’ve just developed a small library to enable you to use Google’s Open Source Skia Graphics Library (via Skija) as a rendering engine for Processing.

README, a basic example and .jars here:

Because Skija targets JOGL (amongst other graphics back-ends) which is also used by Processing’s P2D and P3D modes, it’s possible to get Skija to render into the OPENGL window (sketch) that Processing creates. Though the code to do this isn’t much, it’s not straightforward, so this library eases that.


Hi, I’m trying to use your library but I don’t find the order of files where I need to download your .jar. in my library sketchbook. If I understand well it only works with Processing 4 ? Thanks

You mean the location where you put the .jar?

Processing 3’s IDE (PDE) is bundled w/ Java 8:

@matheplica Yeah, so if you’re using the Processing IDE, it will only work with Processing 4; it works with Processing 3 if you’re using Processing as a library in another IDE.

1 Like

Thanks. I’m mean the location and name of folder(s) to put the .jar in my librairies folder

You can simply drag-and-drop the jar onto the Processing IDE.

1 Like

I try it but I’ve got this error in P4:

No library found for org.jetbrains.skija
The type org.jetbrains.skija.Canvas cannot be resolved. It is indirectly referenced from required .class files

I’m guessing you’re using the 5KB version which doesn’t include the skija dependency.

Either use the other version (easier), or download skijia as .jar and drag-and-drop that onto Processing too.

1 Like

Ok, I try the other .jar and now I’ve got this error :

java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: micycle/processingSkia/SkiaCanvas has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

That suggests Processing is running in Java 8 – are you certainly using Processing 4?

If so,

1 Like

With P4 I’ve got this error now : An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary
After google It’s seem that is a bug of P4Version

Kinda, it’s an warning (not an error) thrown by the JOGL library – the sketch should still run fine.

On my computer It’s an error but I need this line in settings to can run P2D mode :

System.setProperty("jogl.disable.openglcore", "true");

Ok, I tried on another computer and I have the same error, it’s maybe linux.
Here is the full message :

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/home/math/artCode/sketchProcessing/skia/code/processing-skia-1.0.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
	at processing.opengl.PSurfaceJOGL$
	at java.base/
Caused by: java.lang.ExceptionInInitializerError
	at micycle.processingSkia.SkiaCanvas.<init>(
	at micycle.processingSkia.SkiaCanvas.getSkiaCanvas(
	at skia.setup(
	at processing.core.PApplet.handleDraw(
	at processing.opengl.PSurfaceJOGL$DrawListener.display(
	at jogamp.opengl.GLDrawableHelper.displayImpl(
	at jogamp.opengl.GLDrawableHelper.display(
	at jogamp.opengl.GLAutoDrawableBase$
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(
	at jogamp.opengl.GLDrawableHelper.invokeGL(
	at com.jogamp.newt.opengl.GLWindow.display(
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(
	at com.jogamp.opengl.util.AnimatorBase.display(
	at com.jogamp.opengl.util.FPSAnimator$
	at java.base/java.util.TimerThread.mainLoop(
	at java.base/
Caused by: java.lang.IllegalArgumentException: Library file not found in /
	at org.jetbrains.skija.impl.Library._extract(
	at org.jetbrains.skija.impl.Library.load(
	at org.jetbrains.skija.impl.Library.staticLoad(
	at org.jetbrains.skija.BackendRenderTarget.<clinit>(
	... 16 more
RuntimeException: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(
	at java.base/java.lang.reflect.Constructor.newInstance(
	at java.base/
Caused by: java.lang.NoClassDefFoundError: processing/app/Editor
	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(
	at java.base/java.lang.Class.getDeclaredMethod(
	at java.desktop/java.awt.Component.isCoalesceEventsOverriden(
	at java.desktop/java.awt.Component$
	at java.desktop/java.awt.Component$
	at java.base/ Method)
	at java.desktop/java.awt.Component.checkCoalescing(
	at java.desktop/java.awt.Component.<init>(
	at java.desktop/java.awt.Container.<init>(
	at java.desktop/java.awt.Window.<init>(
	at java.desktop/java.awt.Frame.<init>(
	at java.desktop/java.awt.Frame.<init>(
	at java.desktop/javax.swing.JFrame.<init>(
	at Shader.tool.ShaderTool.<init>(Unknown Source)
	... 11 more
Caused by: java.lang.ClassNotFoundException:
	at java.base/
	at java.base/java.lang.ClassLoader.loadClass(
	at java.base/java.lang.ClassLoader.loadClass(
	... 26 more

Aye, it’ll be linux, as the version with dependencies includes Skija Windows version only.

Hi, did I understand correctly that it won’t start on mac OS?

It can do… You’ll just need to download Skija for mac yourself, as I’ve only produced a jar bundled with windows Skija version so far.

I’ve just added linux and mac .jars. Can someone test whether they work?

Tested on Linux (Ubuntu mate 20.10) with Processing 4 and the example works.
I just rename the folder “processingSkia”, create a library folder within and put .jar rename processingSkia.jar.
Thanks, it’s just missing help file to learn who to use it.