Possible duplicate:installed jvm 64-bit or 32-bit
How to check which version of Java bits is installed on my Linux machine? When I type:
java -version
I get:
java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
Is it 32-bit or 64-bit?
Run java with the specified -d64 or -d32 , this will give you an error message if it does not support 64-bit or 32-bit, respectively. Your JVM can support both.
java
-d64
-d32
Why don't you consider the value of System.getProperty("os.arch") in your code?
System.getProperty("os.arch")
Go to this JVM online test and run it.
Then check the displayed architecture: x86_64 means you have a 64-bit version installed, otherwise it will be 32-bit.
Works for every binary, not just java:
file - < $(which java) # heavyly bashic cat `which java` | file - # universal
Source: https://habr.com/ru/post/650845/More articles:Blender vs. Unity - browserTool for creating custom configuration sections - .netCreate a sidebar, for example, Dolphin or Firefox browser on Android - androidPython Programming - pythonHow to make the house key put me in position 1 in Eclipse? - eclipseiOS for Ad-Hoc Mobile Ads: Error Failed to Extract Archive - iosChanging read and write permissions in a file descriptor - cMaster data: Interrupt executing NSFetchRequest - searchIs there an accessible library that can easily record and play back the results of API calls? - c ++Secure Remote Password (SRP) in laity - cryptographyAll Articles