When I run command "java -version" I can see jdk version. But where it stores physically?
Asked
Active
Viewed 337 times
-2
-
2Where does it store what? (And why do you want to know that?) – Mat Feb 25 '12 at 15:04
-
I should find the registry keys: "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion" – Lesya Makhova Feb 25 '12 at 15:08
-
@LesyaMakhova Why would you expect it to be in the Registry? As cagcowboy says in his answer, it's built into the `java` executable. – Cajunluke Feb 25 '12 at 15:10
2 Answers
4
I'm assuming you mean "where are the binaries for Java stored" in which case the answer depends on your operating system.
On linux (or most OS X), typing
which java
will tell you where the main java binary is physically located
On Windows it's a bit harder. See Is there an equivalent of 'which' on the Windows command line? for a good discussion, or for quick check, type into a commad prompt:
echo %PATH%
and look for Java-related entries, or better still:
echo %JAVA_HOME%
to see if that's set. This will be the base directory for your JRE.

Community
- 1
- 1

declension
- 4,110
- 22
- 25
1
I would guess/expect that the java version would be built into the executable.

cagcowboy
- 30,012
- 11
- 69
- 93