# Running P3D Processing sketch in JAR file, using Netbeans

**URL:** <https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145>\
**Category:** Processing\
**Created:** [June 24, 2020, 11:48pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145 "2020-06-24T23:48:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Java.SourceForger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/java.sourceforger/32/9831_2.png) [@Java.SourceForger](https://discourse.processing.org/u/Java.SourceForger)\
**Post date:** [June 24, 2020, 11:48pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145/1 "2020-06-24T23:48:45Z")

</div>

Hi. I know there is a way to program with Processing P3D in an external IDE.

I have successfully been able to run 2D and P3D sketches within NetBeans IDE. But if I build the project to a JAR file with Processing P3D in my sketch, and try to run the JAR file, I get this error:

```auto
java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\ ***** \natives\windows-i586\\gluegen-rt.dll

```

What can I do about this in order to make a Processing P3D sketch run in a JAR file?  
I know it has something to do with the JOGL library Processing uses, but I don’t know how to satisfy the error.  
  
  
**Sketch running fine in netbeans:**

 ![netBeans IDE screenshot](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e4a2dbfc50762271b7b863777570d0d0bbccc2d3.jpeg)

**Sketch running as JAR file in Windows Powershell…**

 ![running Jar with p3D](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2d6bf17066cdf8353ec08b09f371d50f5b0e2f2c.jpeg)

---

<div class="post-metadata">

**Author:** ![prokophapala](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@prokophapala](https://discourse.processing.org/u/prokophapala)\
**Post date:** [February 4, 2021, 2:33pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145/2 "2021-02-04T14:33:06Z")

</div>

I’m Having trouble to run P3D renderer with processing inside NetBeans  
( using NetBeans 11.1 and OpenJDK 11.1 on Ubuntu 18.04 )  
Please could you tel me how you managed to makeit work?

 ![NetBeansProcessing](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/843749b1ad27d1e326097ce555744c79659a155f.png)

and the error message I get:

> run:  
> WARNING: An illegal reflective access operation has occurred  
> WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/home/prokop/SW/JOGL/jogamp-all-platforms/jar/gluegen-rt.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  
> Inconsistency detected by ld.so: dl-lookup.c: 111: check\_match: Assertion `version-\>filename == NULL || ! \_dl\_name\_match\_p (version-\>filename, map)’ failed!  
> /home/prokop/.cache/netbeans/11.1/executor-snippets/run.xml:111: The following error occurred while executing this line:  
> /home/prokop/.cache/netbeans/11.1/executor-snippets/run.xml:68: Java returned: 127  
> BUILD FAILED (total time: 0 seconds)

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [February 4, 2021, 2:57pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145/3 "2021-02-04T14:57:38Z")

</div>

This is an annoying problem with Ubuntu’s OpenJDK. You’ll get the same problem running JOGL / Processing / PDE against that. You could try a downgrade to OpenJDK 8, or downloading an OpenJDK from [AdoptOpenJDK](https://adoptopenjdk.net/) instead.

Incidentally, you know we’re on NetBeans 12.2 now, and 12.3 is almost out?!

---

<div class="post-metadata">

**Author:** ![prokophapala](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@prokophapala](https://discourse.processing.org/u/prokophapala)\
**Post date:** [February 4, 2021, 4:39pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145/4 "2021-02-04T16:39:46Z")

</div>

> [@neilcsmith](#):
>
> [AdoptOpenJDK](https://adoptopenjdk.net/)

What is the benefit of AdoptOpenJDK? How is their JDK11 better than official Apache JDK ?

> [@neilcsmith](#):
>
> Incidentally, you know we’re on NetBeans 12.2 now, and 12.3 is almost out?!

yes, but somehow my Ubuntu 18.04 prefers OpenJDK11 and I did not found simple way how to install OpenJDK 12

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [February 4, 2021, 4:56pm UTC](https://discourse.processing.org/t/running-p3d-processing-sketch-in-jar-file-using-netbeans/22145/5 "2021-02-04T16:56:39Z")

</div>

You’re mixing up OpenJDK and Apache NetBeans in your questions!

AdoptOpenJDK is better than Ubuntu’s OpenJDK in this specific case - it doesn’t suffer from the same bug! Or use another vendor’s OpenJDK. The key thing is that the error `Inconsistency detected by ld.so: dl-lookup.c:` is caused by the OpenJDK from Ubuntu.
