3

I have been workin' on a Java project with Eclipse on my 32-bit Windows Xp pc. This project relates to another C++ project, developed with Visual Studio 2008, through Java Native Interface (JNI). Now I have moved my projects on a 64-bit 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:

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

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.

How could I set, on Eclipse, the fact "This project must be compiled 64-bit way"?

Thank you very much

DavideChicco.it
  • 3,318
  • 13
  • 56
  • 84

2 Answers2

3

There is no 64-bit setting for Java projects, but you run the compiled project in a 64-bit JVM or 32-bit JVM. 64-bit JVM needs 64-bit DLLs and 32-bit JVM needs 32-bit DLLs.

belgther
  • 2,544
  • 17
  • 15
1

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

By this way you're telling Eclipse to Emulate programs in 64bit