Score:0

Java, how does the PATH work with 32-bit and 64-bit Java installs?

eg flag

I have installed the Chocolatey Java package choco install jre8 -y which installs both the 32-bit and 64-bit packages.

When I type java.exe on the console, I see that it is the 32-bit version and that it is located at C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe. When I go to that PATH location, it seems to be a soft or hard link, and it contains java.exe, javaw.exe, and javaws.exe.

I find all of this quite confusing. Can someone explain some of these things please?

  • What is the javapath folder is (well, it's not a folder, looks like a link of some kind, but how and why is it setup this way)?
  • Why is it defaulting to the 32-bit version of java?
  • What if I need the 64-bit version of java, do I have to manually type in the path to the 64-bit version of Java or else it will use the 32-bit version? Or does java someone work out if an application prefers 64-bit java and then it automatically uses that runtime? And does the javapath being a non-folder have something to do with this?
  • There is also a strange folder at C:\Program Files (x86)\Common Files\Oracle\Java\javapath_target_2324328 which also contains the java.exe, javaw.exe, and javaws.exe, so it gets even more confusing, what is that for?
dave_thompson_085 avatar
jp flag
If this were the Oracle installer, or if choco is sufficiently like Oracle, I would refer you to https://stackoverflow.com/questions/74284214/what-is-the-random-number-at-the-end-of-jdk-installation from just two days ago and the link I gave there to https://stackoverflow.com/questions/49540325/ . Java 8 has options `-d32 -d64` which _should_ run the corresponding 32-bit or 64-bit version, but I don't use a standard install and can't verify even for Oracle much less choco. javapath is either a junction or symlink to javapath_target_{uniquenumber}.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.