0

While compiling my project, I'm getting error as 'Running a 32-bit JVM is not supported in this platform'.

When I get this error:

And I get this error when I change my JDK home path to '64-bit JDK' under Project structure -> Platform settings -> SDKs.

Current Solution :

Now if I change my SDK back to 32-bit JDK, it works fine. But when I have my SDK as 64-bit JDK, I'm getting the error as Running a 32-bit JVM is not supported in this platform.

My Question Instead of changing my JDK, how to get out of this problem.

More than that, my question is in, "Running a 32-bit JVM is not supported". Actually I'm not running any JVM here in Intellj. I'm just compiling my Java Source to get a .class files. What is the word running mean here...

Muthu Ganapathy Nathan
  • 3,199
  • 16
  • 47
  • 77
  • Missing an important piece of information - is your operating system 32- or 64-bit? – gknicker Dec 13 '14 at 10:04
  • @gknicker Mine is MAS OSX 64 Bit – Muthu Ganapathy Nathan Dec 13 '14 at 10:05
  • Thank you. If I understand correctly, you have two distinct JDKs installed - a 64-bit JDK and a 32-bit JDK. Is that right? – gknicker Dec 13 '14 at 10:08
  • @gknicker ya I have 2 distict JDK installed – Muthu Ganapathy Nathan Dec 13 '14 at 10:10
  • Please type this on a command line and tell me the results: `java -d64 -version`. Also, please read http://stackoverflow.com/questions/15827430/running-a-64-bit-jvm-is-not-supported-on-this-platform-with-java-d64-option-o and http://stackoverflow.com/questions/9512603/installing-32-bit-jvm-on-64-bit-linux so we can determine whether those posts help your issue. – gknicker Dec 13 '14 at 10:13
  • @gknicker oh I'm getting Running a 64-bit JVM is not supported on this platform. on 32 Bit SDK and Running a 32-bit JVM is not supported on this platform. in 64-bit SDK if I type java -d32 -version respectively... – Muthu Ganapathy Nathan Dec 13 '14 at 10:18
  • @gknicker Thanks for your time. I already read those posts before posting this question. Anyway for now, I'll use 32-bit JDK itself. Let see whether can I get any insights on this. Thanks for your time – Muthu Ganapathy Nathan Dec 13 '14 at 10:23

1 Answers1

0

We have determined that your operating system is MAC OSX 64-bit, and that you have two JDKs installed, both the 32-bit and the 64-bit version.

Other threads on this topic indicate problematic behavior when these two JDKs are installed on the same machine. When you run java command line with -d32 you get the error "Running 64-bit JVM is not supported on this platform" and when you run java command line with -d64 you get the error "Running 32-bit JVM is not supported on this platform".

Therefore, I highly recommend you uninstall the 32-bit JDK, then re-install the 64-bit JDK.

Community
  • 1
  • 1
gknicker
  • 5,509
  • 2
  • 25
  • 41