intellij idea - java.lang.UnsatisfiedLinkError: no usbJava in java.library.path -
i trying connect arduino java , osx yosemite, getting following error:
exception in thread "main" java.lang.unsatisfiedlinkerror: no usbjava in java.library.path @ java.lang.classloader.loadlibrary(classloader.java:1865) @ java.lang.runtime.loadlibrary0(runtime.java:870) @ java.lang.system.loadlibrary(system.java:1122) @ ch.ntb.usb.libusbjava.<clinit>(libusbjava.java:366) @ ch.ntb.usb.usb.init(usb.java:315) @ org.zu.ardulink.connection.usb.digisparkusbconnection.getportlist(digisparkusbconnection.java:116) @ org.zu.ardulink.link.getportlist(link.java:217) @ blinkled.main(blinkled.java:36) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ com.intellij.rt.execution.application.appmain.main(appmain.java:140)
this code i'm executing:
public static void main(string[] args) { try { link link = link.getdefaultinstance(); link = getdigisparkconnection(); // comment row if use default connection list<string> portlist = link.getportlist(); if(portlist != null && portlist.size() > 0) { string port = portlist.get(0); system.out.println("connecting on port: " + port); boolean connected = link.connect(port); system.out.println("connected:" + connected); thread.sleep(2000); int power = iprotocol.high; while(true) { system.out.println("send power:" + power); link.sendpowerpinswitch(2, power); if(power == iprotocol.high) { power = iprotocol.low; } else { power = iprotocol.high; } thread.sleep(2000); } } else { system.out.println("no port found!"); } } catch(exception e) { e.printstacktrace(); } } private static link getdigisparkconnection() { set<string> protocolnames = protocolhandler.getinstalledprotocolimplementationnames(); simplebinaryprotocol protocol = new simplebinaryprotocol(); if(!protocolnames.contains(simplebinaryprotocol.name)) { protocolhandler.installprotocolimplementation(protocol); } return link.createinstance("digisparkconnection", simplebinaryprotocol.name, new digisparkusbconnection("digisparkconnection", protocol.getincomingmessagedivider())); }
when comment 4th line (link = getdigisparkconnection();), following error:
java.lang.unsatisfiedlinkerror: no rxtxserial in java.library.path thrown while loading gnu.io.rxtxcommdriver exception in thread "main" java.lang.unsatisfiedlinkerror: no rxtxserial in java.library.path @ java.lang.classloader.loadlibrary(classloader.java:1865) @ java.lang.runtime.loadlibrary0(runtime.java:870) @ java.lang.system.loadlibrary(system.java:1122) @ gnu.io.commportidentifier.<clinit>(commportidentifier.java:83) @ org.zu.ardulink.connection.serial.serialconnection.connect(serialconnection.java:161) @ org.zu.ardulink.connection.serial.serialconnection.connect(serialconnection.java:139) @ org.zu.ardulink.connection.serial.serialconnection.connect(serialconnection.java:227) @ org.zu.ardulink.link.connect(link.java:187) @ blinkled.main(blinkled.java:37)
that has native rxtx lib not being able solve it. using intellij idea ide. looking error, i've found linux answers, nothing regarding osx. thanks
Comments
Post a Comment