Mathematica JLink and comm.javax.CommPortIdentifier
- To: mathgroup at smc.vnet.net
- Subject: [mg99011] Mathematica JLink and comm.javax.CommPortIdentifier
- From: "Koehler, Charles" <ckoehler at aosmith.com>
- Date: Fri, 24 Apr 2009 03:45:09 -0400 (EDT)
Hello, I would like to use JLink to perform serial communication functions with Mathematica. It appears that javacomm api for Windows is no longer supported by Sun. So as an alternative I am attempting to use RxTx as a substitute. When I attempt to run: In[2]:= InstallJava[] Out[2]= LinkObject["C:\Program Files\Wolfram Research\Mathematica\7.0\SystemFiles\Java\Windows\bin\javaw" -classpath "C:\Program Files\Wolfram Research\Mathematica\7.0\SystemFiles\Links\JLink\JLink.jar" -Xmx256m -Djava.system.class.loader=com.wolfram.jlink.JLinkSystemClassLoader com.wolfram.jlink.Install -init "C:\Documents and Settings\ckoehler\Local Settings\Temp\m19.tmp",4,4] I assume that I have installed the rxtx dll and jar files in the correct location. LoadJavaClass["comm.javax.CommPortIdentifier"] I receive the following error: Java::excptn: A Java exception occurred: java.lang.ClassNotFoundException: comm.javax.CommPortIdentifier at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247). LoadJavaClass::fail: Java failed to load class comm.javax.CommPortIdentifier. >> I realize this is may not be the appropriate newsgroup for this, but the only documentation I could find regarding Jlink is out of data. Thanks for any direction you might be able to provide. Chuck Koehler