RishiGupta12 / SerialPundit

Serial port communication in Java - FTDI D2XX, HID API, X/Y modem
GNU Affero General Public License v3.0
127 stars 56 forks source link

JNI call ThrowNew failed to throw exception #17

Closed KanameMashiro closed 7 years ago

KanameMashiro commented 7 years ago

Hello Rishi, I tried to run the example but I got this error in the Eclipse console, what does it mean or why it happens?

JNI call ThrowNew failed to throw exception !, FormatMessageA(), error code : 15100
com.serialpundit.core.SerialComException: 
    at com.serialpundit.serial.internal.SerialComPortJNIBridge.openComPort(Native Method)
    at com.serialpundit.serial.SerialComManager.openComPort(SerialComManager.java:618)
    at paquetePruebaSerial.Example.main(Example.java:14)

The line 14:

            long handle = scm.openComPort("COM5", true, true, true);

I was working on a machine with Win8.1 (AMD64)

RishiGupta12 commented 7 years ago

Does com5 exists. Which serial hw you are using.

KanameMashiro commented 7 years ago

Thanks for answer, COM5 exists. I'm using an Arduino Nano CH340G. Solved already, re-installed drivers, that seems to be buggy, and the program works.