How to check the Java architecture ?

To check the Java architecture whether it is 32 bit or 64 bit, the following commands will be helpful.

Execute the following commands in the command line and check the results

java -d32 -version

java -d64 -version

If any of the above command is giving an error message similar to “Error: This Java instance does not support a xx-bit JVM.” If it is not supporting 32 bit, then we can say it is a 64 bit Java. If it is not supporting 64 bit, we can say it is a 32-bit Java. The screenshot of the same is attached below.

java_screen.PNG

Hope this will help .. 🙂

Advertisements

“Missing artifact jdk.tools:jdk.tools:jar:1.6”

While using maven, we may face an error like
“Missing artifact jdk.tools:jdk.tools:jar:1.6”

This problem can be fixed by adding the below lines to your pom.xml file.
Replace ${JAVA_HOME} in the xml file with the absolute path of JAVA_HOME.

<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<version>1.6</version>
<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>