# java.lang.UnsatisfiedLinkError

**URL:** https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848
**Category:** Electronics (Arduino, etc.)
**Created:** [January 4, 2020, 1:11am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848 "2020-01-04T01:11:36Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 4, 2020, 1:11am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/1 "2020-01-04T01:11:36Z")

</div>

I am developing a Processing Sketch in Eclipse that uses USB by means of the serial port emulator in jssc.jar. It charts data received over the serial port as lines on a graph. When the program is run, the sketch window opens. But in the Console tab I get these errors:

```auto
java.lang.UnsatisfiedLinkError: 'java.lang.String[] jssc.SerialNativeInterface.getSerialPortNames()'
	at jssc.SerialNativeInterface.getSerialPortNames(Native Method)
	at jssc.SerialPortList.getWindowsPortNames(SerialPortList.java:309)
	at jssc.SerialPortList.getPortNames(SerialPortList.java:298)
	at jssc.SerialPortList.getPortNames(SerialPortList.java:182)
	at processing.serial.Serial.list(Unknown Source)
	at SensorsGraph4.SensorsGraph4.setup(SensorsGraph4.java:56)
	at processing.core.PApplet.handleDraw(PApplet.java:2425)
	at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)

```

What is causing these errors?

The project can be downloaded from:  
[http://www.mediafire.com/file/0ag0wrntteferqu/SensorsGraph4.zip/file](http://www.mediafire.com/file/0ag0wrntteferqu/SensorsGraph4.zip/file)

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 4, 2020, 2:33am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/2 "2020-01-04T02:33:02Z")

</div>

did you verify that your sketch works error free from the PDE?

so you know already you have a ‘eclipse IDE’ problem?

---

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 4, 2020, 11:05pm UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/3 "2020-01-04T23:05:28Z")

</div>

This sketch was originally developed in the PDE where it works. This problem in Eclipse is happening during my effort to migrate the sketch from PDE to Eclipse. I want to further develop the sketch in Eclipse so I can step through the execution when debugging is needed, and use either Javadoc, or Doxygen, to document it.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 5, 2020, 2:10am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/4 "2020-01-05T02:10:22Z")

</div>

thanks,  
did you try

> <https://stackoverflow.com/questions/20568602/how-to-add-java-jssc-library-to-eclipse>

---

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 5, 2020, 5:46am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/5 "2020-01-05T05:46:32Z")

</div>

The procedure in that link is what I had already done, with the exception I imported jssc.jar, and then put it in the path. Were it not in the path I would not have been able to execute the sketch because the serial class would not be available. The errors I opened this thread with are runtime errors.

If you wish to see for yourself the workspace, and the project within it, can be downloaded from:  
[http://www.mediafire.com/file/0ag0wrntteferqu/SensorsGraph4.zip/file](http://www.mediafire.com/file/0ag0wrntteferqu/SensorsGraph4.zip/file)

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 5, 2020, 6:05am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/6 "2020-01-05T06:05:05Z")

</div>

no, i not use eclipse

but why you not take a look at  
processing-3.5.3\modes\java\libraries\serial\

i would assume you just forget to copy something??

* * *

or you wait for the eclipse users to jump in here.

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [January 5, 2020, 4:31pm UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/7 "2020-01-05T16:31:42Z")

</div>

Try the following posts:

- [https://forum.processing.org/one/topic/serial-library-in-eclipse.html](https://forum.processing.org/one/topic/serial-library-in-eclipse.html)
- [https://stackoverflow.com/questions/58118965/how-to-fix-a-java-lang-unsatisfiedlinkerror-for-jssc-needs-hard-float](https://stackoverflow.com/questions/58118965/how-to-fix-a-java-lang-unsatisfiedlinkerror-for-jssc-needs-hard-float)

Kf

---

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 7, 2020, 3:49am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/8 "2020-01-07T03:49:48Z")

</div>

Your first suggest link recommends the addition of -d32 option at:  
Run =\> Run Configurations =\> Java Application =\> =\> (x)= Arguments =\> VM Arguments  
When this is done, when I run the sketch, I get message box titled “Java Virtual Machine Launcher” with the error message:

```auto
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

```

In the console tab I see the error:

```auto
Unrecognized option: -d32

```

I do not know what to do about this. I considered installing 32 Bit Eclipse, but I do not see a 32 Bit option on the Eclipse download page.

Your second suggested link seems relevant only to Linux OS. My OS is Windows 7. I did not find a way to install “gnueabihf” in my Windows 7 OS, and if there is a Windows 7 equivalent, I do not know what it is.

---

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 8, 2020, 5:21am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/9 "2020-01-08T05:21:15Z")

</div>

The fatal exception problem is solved. To solve it:  
I changed the Java installation to latest: (OpenJDK13U-jdk\_x64\_windows\_hotspot\_13.0.1\_9.msi) from:

> **[Latest release | AdoptOpenJDK](https://adoptopenjdk.net/releases.html)**
>
> AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.

Then I downloaded the latest (version 2.8) JSSC code from:  
[https://search.maven.org/search?q=jssc](https://search.maven.org/search?q=jssc)  
and in the Eclipse project I used it to substitute the JSSC that came with the Processing core.

The exception errors disappeared. But now I have the next problem. There are no serial ports returned by the Serial.list() function, even though I have an Arduino device plugged into an USB port. I would appreciate recommendations on how to troubleshoot this.

Is it possible Serial.list() is not finding USB ports because I am using the OpenJDK?

---

<div class="post-metadata">

### Author: ![spflanze](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@spflanze](https://discourse.processing.org/u/spflanze)
#### Post date: [January 28, 2020, 5:22am UTC](https://discourse.processing.org/t/java-lang-unsatisfiedlinkerror/16848/10 "2020-01-28T05:22:23Z")

</div>

After importing the JSSC 2.8 (the latest) I still had trouble when executing the sketch, in spite of the error indicator no longer being on that line. It turns out that the JSSC version I was using was not the problem. The problem was lack of drivers. This was solved by installing the Arduino IDE to get its USB drivers.
