2

I am getting an error in eclipse with regards to my win32com.dll file. From the error it would appear I am trying to use a 32-bit .dll instead of a 64-bit, but unfortunately I haven't been able to find a 64-bit win32com.dll file anywhere and I'm at a loss at how to proceed. I literally downloaded Eclipse tonight and this is my first time writing in Java, so please be gentle.

Thanks!

Error loading win32com: java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre6\bin\win32com.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

EDIT: I think Java discontinued support of the Java Communications API, but I'm not really sure what else to do to fix this. Can anyone point to a good serial port Java example? I haven't been able to find one anywhere...

tmwoods
  • 2,353
  • 7
  • 28
  • 55

5 Answers5

3

So I gave up on this and switched to RXTX. I think quite a few people have done this as all my research pointed to this instead of figuring out what I wanted to originally.

In a nutshell you need to do is to download the correct files from here.

Install the files in the following directories:

rxtxParallel.dll & rxtxSerial.dll --> Program Files/Java/jre6/bin

RXTXComm.dll --> Program Files/Java/jre6/lib/ext

Note that this is only for 64-bit environments. Hope this helps for anyone in my position in the future!

tmwoods
  • 2,353
  • 7
  • 28
  • 55
1

I got around the same by installing 32-bit JDK instead of 64-bit one in my Windows 7 64-bit. Hope it help.

firebear
  • 774
  • 1
  • 8
  • 19
0

Reinstall JDK 32bit If you are using 64bit version

Foredoomed
  • 2,219
  • 2
  • 21
  • 39
  • win32com.dll isn't part of the JDK. It's part of the [Java Communications API](http://www.oracle.com/technetwork/java/index-jsp-141752.html) but I can't figure out where to download three important files for port support (`win32com.dll`, `javax.javax.comm.properties` and `comm.jar`). – tmwoods Mar 13 '13 at 13:29
  • I should note that I can't find the *64-bit* version of these three files. – tmwoods Mar 13 '13 at 21:42
0

You can download the files you need at this address:
http://llk.media.mit.edu/projects/picdev/software/javaxcomm.zip

Make sure to add the jar as a library to your project.

This example seems elaborate enough using this API:
http://www.java2s.com/Code/Java/Development-Class/ReadfromaSerialportnotifyingwhendataarrives.htm

Byron
  • 1,313
  • 10
  • 22
  • Thanks @Byron, but unfortunately that is the same set of files I am currently using (i.e. the win32com.dll file is 32-bit). – tmwoods Mar 13 '13 at 19:07
0

Install 32 bit jdk and change eclipse run configurations in jre tab select Alternate JRE then add 32 bit jdk's bin path

Baganaakh
  • 67
  • 1
  • 3
  • 17