So now the next Problem... I wantet to use the exact same code that works on my Windows but on my mac. I switched out the dlls for a jnilib. So that rxtx should work on my mac... but everytime I try to start the Programm stops with an error:
# # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000000010d096418, pid=17666, tid=4867 # # JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19) # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.60-b09 mixed mode bsd-amd64 compressed oops) # Problematic frame: # C [librxtxSerial.jnilib+0x3418] read_byte_array+0x44 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /Users/kjh/Documents/smart_1/smart_1/hs_err_pid17666.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. #
And here the content of /Users/kjh/Documents/smart_1/smart_1/hs_err_pid17666.log:
So from my understanding that is an error in rxtx, so there is nothing I can do... but maybe you have an idea.
If there is no hope would JSSC work on windows mac and also linux? And if it would can somebody link a good tutorial on how to use is because using rxtx was very hard...
I also changed COM3 to /dev/tty.usbmodem1411 to use the right serial port...
I am reffering to the Code in that post: