micycle1 / processing-core-4

Processing 4 core as a Maven artifact via JitPack
35 stars 10 forks source link

4.2 after adding JOGAMP repositories Load ok, but has runtime exception. #10

Closed xlinx closed 1 year ago

xlinx commented 1 year ago

Following i have used the code TAG, but still messes all together. **

java.lang.NullPointerException: Cannot invoke "java.net.URL.openStream()" because "url" is null
    at processing.opengl.PJOGL.loadVertexShader(PJOGL.java:576)
    at processing.opengl.PJOGL.loadVertexShader(PJOGL.java:537)
    at processing.opengl.PGraphicsOpenGL.getPolyShader(PGraphicsOpenGL.java:7054)
    at processing.opengl.PGraphicsOpenGL.flushPolys(PGraphicsOpenGL.java:2343)
    at processing.opengl.PGraphicsOpenGL.flush(PGraphicsOpenGL.java:2280)
    at processing.opengl.PGraphicsOpenGL.frustum(PGraphicsOpenGL.java:4538)
    at processing.opengl.PGraphicsOpenGL.perspective(PGraphicsOpenGL.java:4524)
    at processing.opengl.PGraphicsOpenGL.perspective(PGraphicsOpenGL.java:4511)
    at processing.core.PApplet.perspective(PApplet.java:13353)
    at tw.decade.God.draw(God.java:74)

**

same project 4.1.1 -> 4.2 has start error above that show libDifferent.jnilib cant found. If I implementation local p4.app lib is ok.( like follow gradle setup which i commoned) this is my build.gradle

Following i have used the code TAG, but still messes all together. '

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven { url 'https://jogamp.org/deployment/maven' }
}
dependencies {
//    implementation fileTree(dir: '/Applications/Processing.app/Contents/Java/core/library', include: ['*.jar'])
//    implementation fileTree(dir: '/Applications/ProcessingIntel.app/Contents/Java/core/library', include: ['*.jar'])
    implementation 'com.github.micycle1:processing-core-4:4.2'
}
application {
    mainClass = 'tw.MainWindow'
//    applicationDefaultJvmArgs = ["-Djava.library.path=" + file("${buildDir}/libs/hello/shared").absolutePath]
    applicationDefaultJvmArgs = ["-Djava.library.path=" + file("/Applications/ProcessingIntel.app/Contents/Java/core/library/macos-x86_64").absolutePath]
//    applicationDefaultJvmArgs = ["-Djava.library.path=" + file("/Applications/ProcessingIntel.app/Contents/Java/core/library/macos-aarch64").absolutePath]
}

'

micycle1 commented 1 year ago

This was fixed in https://github.com/micycle1/processing-core-4/commit/d33cae501ea3035a78bc09dee59a6292c77e8bad but I'm yet to create a release for it. I'll do that now.

micycle1 commented 1 year ago

Try 4.2.1: https://jitpack.io/#micycle1/processing-core-4/4.2.1.

xlinx commented 1 year ago

@micycle1 thx for the update. I have tested and result as follow:

works GREAT like before. It's no need applicationDefaultJvmArgs in the gradle script anymore.

show exception: Full screen disabled: could not load libDifferent.jnilib from core.jar

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven { url 'https://jogamp.org/deployment/maven' }
}
dependencies {
      implementation 'com.github.micycle1:processing-core-4:4.2.1'
}

BTW thx u maintain this cool repository that helps us finish lot of projects in Taiwan ( https://decade.tw ) and also Manchester UK (https://youtu.be/98XtgJJI_4Y) , plz allow me have a donation for a fish and chip to u or someday come to our country and let me take u eat some our Taiwanese local food. anyway THANK U Micycle.

micycle1 commented 1 year ago

Ok, try this below (the file was indeed missing from the build, which hasn't been a problem for me because I don't use mac).

If it works for you, I'll create a proper release (4.2.2) from it.

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

I'll certainly take you up on your offer if I come to taiwan! I have a chinese GF (probably wife within next year or two) and even went to china recently, so very possible I'll be there someday.

xlinx commented 1 year ago

so cooool. Welcome to Asia, if TW needs a tour plz let me know.