Eclipse 中的 win32com.dll 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15378634/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:10:14  来源:igfitidea点击:

Error with win32com.dll in Eclipse

javaeclipsewin32com

提问by tmwoods

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.

我在 eclipse 中遇到关于我的 win32com.dll 文件的错误。从错误看来,我正在尝试使用 32 位 .dll 而不是 64 位,但不幸的是我无法在任何地方找到 64 位 win32com.dll 文件,我不知所措在如何进行。我今晚真的下载了 Eclipse,这是我第一次用 Java 编写,所以请保持温和。

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

加载 win32com 时出错:java.lang.UnsatisfiedLinkError:C:\Program Files\Java\jre6\bin\win32com.dll:无法在 AMD 64 位平台上加载 IA 32 位 .dll

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...

编辑:我认为 Java 停止了对 Java Communications API 的支持,但我不确定还能做些什么来解决这个问题。谁能指出一个好的串行端口 Java 示例?我一直找不到任何地方...

回答by tmwoods

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.

所以我放弃了这个并切换到RXTX。我认为很多人已经这样做了,因为我所有的研究都指向了这一点,而不是弄清楚我最初想要什么。

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

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

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

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!

请注意,这仅适用于 64 位环境。希望这对我未来职位上的任何人都有帮助!

回答by Foredoomed

Reinstall JDK 32bit If you are using 64bit version

重新安装 JDK 32bit 如果您使用的是 64bit 版本

回答by Byron

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

你可以在这个地址下载你需要的文件:http:
//llk.media.mit.edu/projects/picdev/software/javaxcomm.zip

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

确保将 jar 作为库添加到您的项目中。

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

使用此 API,此示例似乎足够详细:http:
//www.java2s.com/Code/Java/Development-Class/ReadfromaSerialportnotifyingwhendataarrives.htm

回答by firebear

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

我通过在 Windows 7 64 位中安装 32 位 JDK 而不是 64 位 JDK 来解决相同的问题。希望有帮助。