Processing 4b3 and 4b2 with P2D & P3D in IntelliJ / Eclipse

I’ve using Processing with Eclipse / IntelliJ and ported a lot of old projects to Processing & Java 11.

Everything works great with the standard modus i.e size(xDimension, yDimension) but I’ve get an JOGL error whoever involving the P2D or P3D rendering pipeline:

java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable

I’ve included the libraries jogl-all*.jar and gluegen-rt-*.jar in the project.
It does not work with plain Eclipse nor IntelliJ.

Not sure if this is the cause:


Either way, 4.0b4 is working fine for me in Eclipse as a Maven artifact (the added bonus being you don’t have to worry about sourcing jar dependencies, such as JOGL, yourself).

Great!

But I’m using Gradle and somehow did not get the declaration in the build.gradle right:

repositories {
    mavenCentral()
    maven {
        url "com.github.micycle1"
        artifactUrls "https://github.com/micycle1/processing-core-4"
    }
}

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.micycle1:processing-core-4:4.0b4'
}

That works! Great!
Now I’ve imported all the dependencie!

But now I get a UnsatisfiedLinkError: can’t load library …/natives/macosx-universal//nativewindow_awt

Gradle imports all org.jogamp.gluegen:*. and org.jogamp.jogl

It appears to be a problem with the jogl library itself, which is apparently fixed in 2.4.0 (a version yet to be officially released).

I’ve just pushed a commit that points the maven project’s JOGL to 2.4.0-rc-20210111. Try this:

dependencies {
    implementation 'com.github.micycle1:processing-core-4:e63d5d0d4b'
}

Thanks for all your efforts and quick help!!! Once again some stupid questions:

The new artifact ‘processing-core-4:e63d5d0d4b’
also imports the java-fx-*:17.0.2 libraries, but not the jog-all and gluegen-rt- libraries in version JOGL 2.4.0-rc-.

According to the updated pom.xml the artifact ‘processing-core-4:4.0b4’ should also import all JOGL libraries in the upcoming JOGL 2.4.0-rc-* version, but it still imports JOGL version 2.3.2.

I’ve tried to import JOGL directly with:
implementation ‘org.jogamp.jogl:jogl-all:2.4.0-rc-20210111’
implementation ‘org.jogamp.jogl:jogl-all-main:2.4.0-rc-20210111’
implementation ‘org.jogamp.gluegen:gluegen-rt:2.4.0-rc-20210111’
implementation ‘org.jogamp.gluegen:gluegen-rt-main:2.4.0-rc-20210111’

but gradle complains not to find the pom.xml files for the JOGL release candidate 20210111.