gpt4 book ai didi

java - Eclipse,为64位设置编译一个32位项目

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:24:01 27 4
gpt4 key购买 nike

我一直在我的 32 位 Windows Xp 电脑上使用 Eclipse 开发一个 Java 项目。该项目与另一个 C++ 项目相关,该项目是通过 Java native 接口(interface) (JNI) 使用 Visual Studio 2008 开发的。现在,我已将我的项目转移到 64 位 Windows 7 电脑上。

C++ 项目在 Visual Studio 上的编译没问题,但如果我尝试在 Eclipse 上编译我的 Java 项目,那就是我得到的:

Exception in thread "Thread-3" java.lang.UnsatisfiedLinkError: C:\Users\Desktop\temp\BioTesi\BioCpp.dll: %1 is not a valid Win32 application

我认为问题在于该项目是为 32 位架构设置的,而现在它“不知道”它在 64 位架构上工作。

我如何在 Eclipse 上设置“此项目必须以 64 位方式编译”这一事实?

非常感谢

最佳答案

Java 项目没有 64 位设置,但您可以在 64 位 JVM 或 32 位 JVM 中运行编译后的项目。 64 位 JVM 需要 64 位 DLL,32 位 JVM 需要 32 位 DLL。

关于java - Eclipse,为64位设置编译一个32位项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8518450/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com