• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CLI does not detect 32 bit JRE 7 on Windows 7 64 bit

 
Steve Atkins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've installed 32 bit JRE 7 on 64 bit Windows 7 OS. The following registry path is created with entries for JavaHome and RuntimeLib under it:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.7.0_13

But when I go to CLI and enter the command java it displays the 'java' is not recognized as an internal or external command, operable program or batch file

This problem does not occur when I install 64 bit JRE and without even manually setting the JAVA_HOME and PATH environment variables to their appropriate values.

Anybody any ideas on why error occurs for 32 bit JRE but not for 64 bit JRE?

One possible reason is that CLI is 64 bit process so it detects 64 bit JRE but not 32 bit JRE - am I right or wrong?

Please help!!!
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you're right. Well, partly anyway.

If I open a command prompt using the start menu and execute "java -version", it shows the 64bit version. If I use my 32bit version of Total Commander to open a command prompt and execute "java -version", it shows the 32bit version. So the command prompt isn't necessarily 32bit or 64bit - it depends on how it is started. And a 32bit command prompt tries to run a 32bit JVM, and a 64bit command prompt tries to run a 64bit JVM.
 
Steve Atkins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:I believe you're right. Well, partly anyway.

If I open a command prompt using the start menu and execute "java -version", it shows the 64bit version. If I use my 32bit version of Total Commander to open a command prompt and execute "java -version", it shows the 32bit version. So the command prompt isn't necessarily 32bit or 64bit - it depends on how it is started. And a 32bit command prompt tries to run a 32bit JVM, and a 64bit command prompt tries to run a 64bit JVM.


Thank you Rob!

Is it possible to programmatically run 64 bit CLI process in 32 bit mode - thereby resulting in CLI detecting the 32 bit JRE?
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so. It's one of the reasons I install both on my machines.
 
Steve Atkins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:I don't think so. It's one of the reasons I install both on my machines.


Thanks Rob! Appreciate that!
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic