简体   繁体   English

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

[英]Eclipse, compile a 32-bit project for 64-bit settings

I have been workin' on a Java project with Eclipse on my 32-bit Windows Xp pc. 我一直在使用我的32位Windows Xp pc上的Eclipse Java项目。 This project relates to another C++ project, developed with Visual Studio 2008, through Java Native Interface (JNI). 该项目涉及另一个使用Visual Studio 2008通过Java Native Interface(JNI)开发的C ++项目。 Now I have moved my projects on a 64-bit Windows 7 pc. 现在我已将我的项目移动到64位Windows 7 PC上。

The compilin' of the C++ project on Visual Studio is alright, but if I try to compile my Java project on Eclipse, that's what I get: Visual Studio上的C ++项目的compilin'没问题,但如果我尝试在Eclipse上编译我的Java项目,那就是我得到的:

Exception in thread "Thread-3" java.lang.UnsatisfiedLinkError: C:\\Users\\Desktop\\temp\\BioTesi\\BioCpp.dll: %1 is not a valid Win32 application 线程“Thread-3”中的异常java.lang.UnsatisfiedLinkError:C:\\ Users \\ Desktop \\ temp \\ BioTesi \\ BioCpp.dll:%1不是有效的Win32应用程序

I think that the problem is that the project is set for a 32-bit architercture, while now it does not "know" that it's workin' on a 64-bit architecture. 我认为问题在于项目设置为32位架构,而现在它并不“知道”它在64位架构上工作。

How could I set, on Eclipse, the fact "This project must be compiled 64-bit way"? 我怎样才能在Eclipse上设置“这个项目必须以64位方式编译”的事实?

Thank you very much 非常感谢你

There is no 64-bit setting for Java projects, but you run the compiled project in a 64-bit JVM or 32-bit JVM. Java项目没有64位设置,但您可以在64位JVM或32位JVM中运行已编译的项目。 64-bit JVM needs 64-bit DLLs and 32-bit JVM needs 32-bit DLLs. 64位JVM需要64位DLL,而32位JVM需要32位DLL。

inside: Run Configurations... -> Arguments (tab) -> Programa Arguments -> Type '-d64' inside:Run Configurations ... - > Arguments(tab) - > Programa Arguments - > Type'-d64'

By this way you're telling Eclipse to Emulate programs in 64bit 通过这种方式,你告诉Eclipse模拟64位程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM