MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica JLink and comm.javax.CommPortIdentifier

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99040] Re: Mathematica JLink and comm.javax.CommPortIdentifier
  • From: dh <dh at metrohm.com>
  • Date: Fri, 24 Apr 2009 06:14:23 -0400 (EDT)
  • References: <gsrqm0$r47$1@smc.vnet.net>


Hi Charles,

I guess Java does not find your library. You have to tell Jva where it 

is located. You may e.g. use the option: -Djava.library.path=....

Daniel



Koehler, Charles wrote:

> 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




  • Prev by Date: Re: Re: MatrixPlot with color range bar
  • Next by Date: Re: Using a jpg picture for a 2D plot background
  • Previous by thread: Mathematica JLink and comm.javax.CommPortIdentifier
  • Next by thread: Re: Mathematica JLink and comm.javax.CommPortIdentifier