1

I am new to JOGL. I use Eclipse and I imported JOGL jar and dll (yes, Windows OS). But, when I was searching for JOGL libraries, I downloaded 32 bit version. I have 64 bit OS, but since I can run 32 bit apps I thought it will still be more suitable. But compiler is complaining: Can't load IA 32-bit .dll on a AMD 64-bit platform

Well, first, I thought Java itself is NOT separated by architecture. Yes, I know I am using native libraries to link into Windows OpenGL interface (API), but I just want to include these code snippets into java bytecode, so why compiler cant let me use 32 bit ones? Thanks.

B.Gen.Jack.O.Neill
  • 8,169
  • 12
  • 51
  • 79

2 Answers2

4

Since you have a 64-bit OS, you installed the 64-bit JVM. The 64-bit JVM cannot use the 32-bit DLLs, so you'll need to either download the 64-bit ones, or alternatively, install the 32-bit JVM on your system and set Eclipse to use that JVM instead.

JohnnyO
  • 3,018
  • 18
  • 30
  • Thanks, but why? I mean, from pure JVM look, it is just some code snippet. CPU can handle it, so why JVM can not? I know there might be OS limitations, but JVM could start another process in 32 bit mode and than start the code. – B.Gen.Jack.O.Neill Mar 16 '11 at 21:15
  • 1
    This isn't a JVM-specific problem, its specific to the way Windows supports 32-bit emulation. There are some hacks/workarounds, but they don't work in all cases, which is why the JVM doesn't try to use any of them (see: http://stackoverflow.com/questions/128445/calling-32bit-code-from-64bit-process). – JohnnyO Mar 17 '11 at 14:00
1

64bit JVM cannot load 32bit libraries. You need to start 32b JVM to make it work (or get 64b dlls).

JIV
  • 813
  • 2
  • 12
  • 30