tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abid Hussain <abid.huss...@abid76.de>
Subject Re: using a dll in a webapp
Date Fri, 15 Dec 2006 14:16:37 GMT
Hi again,

sorry, I should have said that before. Adding the path without the 
filename (using String win32com = new 
File(this.getClass().getClassLoader().getResource("win32com.dll").toURI()).getParent();)
also doesn't work.

Loading the dll using
CommDriver commDriver = (CommDriver) 
Class.forName("com.sun.comm.Win32Driver").newInstance();
commDriver.initialize();
instead of
System.loadLibrary("win32com.dll");
fails, too.

Any ideas?

Best regards,

Abid


Christopher Schultz schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Abid,
> 
> Abid Hussain wrote:
>> I want to establish a connection to a serial port from my webapp by
>> using the javax.comm package which uses the win32com.dll (on windows
>> systems).
>>
>> I resolve the path of the dll in my webapp:
>> String win32com = new
>> File(this.getClass().getClassLoader().getResource("win32com.dll").toURI()).getPath();
>>
>> Now, I add the path to the java.library.path property:
>> System.setProperty("java.library.path",
>> System.getProperty("java.library.path") + File.pathSeparator + win32com);
> 
> It looks like you are adding the path to the DLL /including/ the
> filename. I believe that you want to include the path but /not/ the
> filename.
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFgqyB9CaO5/Lv0PARAoyvAKCmbNynmnBsJWAtLDDS04A1cCRAfgCfRSwA
> 8JSVeCm3CH3bkmA+yrfk6/4=
> =suZt
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

-- 

Abid Hussain
Mail: abid.hussain@abid76.de
Web: http://www.abid76.de

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message