0

I'm trying to use SammyIAm's "Moppy", but every time I click run, I get this error, how would I go about fixing it?

Entire console output on pastebin.

I have tried searching for help, but all the instructions I have found seem to be for linux, and as per the title, I use Windows XP.

gprathour
  • 14,813
  • 5
  • 66
  • 90
ja_ke
  • 3
  • 4
  • I cant remember where i downloaded the rxtserial library from, but you need to find it and add it to the classpath of the application you are using. google on rxtserial library – maress Jul 08 '14 at 11:43
  • @maress I have both rxtxserial.dll and rxtx's jar, how would I add them? – ja_ke Jul 08 '14 at 11:54
  • Do you have controll to the classpath of the application? Found where where it is and just copy paste the dll there, otherwise, if you have access to the jre (normally not recommended) copy paste them to the ext dir (jre/lib/ext/) – maress Jul 08 '14 at 12:04

1 Answers1

0

java.lang.UnsatisfiedLinkError is thrown when java code attempts to load a native library that doesn't exist. In the SammyIAm's Moppy github project you can find the rxtxSerial.dll which is the native library for windows. You have to add this library to your classpath and then load it. You can do it specifying the next parameter in your java call:

java -Djava.library.path=C:\path_to_your_dll\

And add the next snippet to your code in order to load the library:

System.loadLibrary("rxtxSerial");

Please note that in loadLibrary is not necessary to specify the extension (.dll on windows, .so on unix .dylib on mac an so on) because java do it automatically.

Hope this helps,

albciff
  • 18,112
  • 4
  • 64
  • 89
  • Sorry I rewrite my answer I hope that this time is more helpful :). – albciff Jul 08 '14 at 11:57
  • I'm a complete novice, an don't understand how to do this, I'm using the pre-existing moppy project. Can you give me step by step instructions on how to do it? – ja_ke Jul 08 '14 at 11:58
  • More helpful, still don't get it though – ja_ke Jul 08 '14 at 11:59
  • You're using netbeans, try with the answer instructions in this questions to add the native library: http://stackoverflow.com/questions/12798530/including-native-library-in-netbeans – albciff Jul 08 '14 at 12:01
  • The program appears to run, just hooking up my 'duino and floppy, will report back shortly – ja_ke Jul 08 '14 at 12:22
  • Perfect, thanks :)!, I apologize for my first answer... I have never been do it nothing in arduino and at first I didn't realize that you are running a program to interact with arduino not in arduino itself. – albciff Jul 08 '14 at 13:15
  • It's fine, we got there in the end :) – ja_ke Jul 09 '14 at 20:24