0

I have been trying java -d64, but get Error: This Java instances does not support a 64-bit JVM. Please install the desired version. I know I installed the 64-bit version, and when I go to Control Panel -> Programs and Features, I have "Java SE Development Kit 8 Update 212 (64-bit)". Any idea as to why this is?

7
  • java -d64 is not a valid option. If you are executing an 64bit Java than it automatically runs as 64bit (there is no other possibility). If the standard Java version is not 64bit then you may have an old Java version lying around that has no (uni)installer. Execute which java.exe to see where it is installed and delete the whole installation directory.
    – Robert
    May 20, 2020 at 12:13
  • Is C:\Program Files (x86)\Common Files\Oracle\Java\javapath listed on your environment path? May 20, 2020 at 12:14
  • My JAVA_HOME is pointing to the supposed 64-bit version.
    – formicaman
    May 20, 2020 at 12:20
  • @barlop Of course I looked it up - nothing worked.
    – formicaman
    May 20, 2020 at 12:32
  • @formicaman - You will need to be more detailed in your descriptions of the problem, "nothing worked", does not tell us what you tried. Instead of replying to comments you should clarify your question by editing it.
    – Ramhound
    May 20, 2020 at 13:23

1 Answer 1

-1

First, you should run where java or java -version to make sure you are running what you think you are. If you aren't, get the path to the version folder of the java version you are trying to run and run this:

C:\Users\YourName>C:\Program Files (x86)\Java\<folder with version\bin\java.exe <args>

Or you could do this:

path = %path%;C:\Program Files (x86)\Java\<version>\bin

For example with a specific JDK version:

C:\Program Files (x86)\Java\jdk1.8.0_211\bin\java.exe -jar RunMe.jar

This will also maintain directory, so if you run either of these commands, this will act like the executable is copied to the folder you are running it from.

9
  • No Way. You are confused. Look at the error he gets it is nothing to do with a path. And there's also no reason for you to be giving an example with a jar file either.
    – barlop
    May 20, 2020 at 16:32
  • No. IF he is getting a 64-bit instance error, that means that the instance he is running does not support 64-bit. My answer is a way to specifically run an instance that does support 64-bit. And the -jar was just an example to show that it still functions the same.
    – coresdev
    May 20, 2020 at 16:35
  • If that's the case (and it may be), then his error is that he isn't running the one he installed. So what he should do is where java and verify that he is running the one he thinks he is running he isn't, then you should tell him that.
    – barlop
    May 20, 2020 at 16:56
  • Ok, I'll add that to my answer.
    – coresdev
    May 20, 2020 at 16:56
  • where java (the where command is a windows command)
    – barlop
    May 20, 2020 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .