Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check if 32 bit or 64 bit processor?

 
Aparna Sree
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to find out if the processor is 32 bit or 64 bit?

System.getProperty("os.arch") or System.getProperty("sun.arch.data.model") checks for the OS.

Similarly do we have anything specific to processor in Java?



 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it matter? You can't use any 64-bit features of the processor if the OS is only 32-bit.
 
Aparna Sree
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok!
I wasn't sure of the behavior of a 64 bit processor with 32 bit OS .
I have DLLs for 64 bit machine and 32 bit machine which I am supposed to execute through java. I had to check the processor version before executing.
That info helped. Thanks!
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
64-bit DLLs will not work on 32-bit Windows, even if the processor is 64-bit. So if you just use the OS architecture that will be just fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic