-2

When I run command "java -version" I can see jdk version. But where it stores physically?

Lesya Makhova
  • 1,190
  • 2
  • 13
  • 27

2 Answers2

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
  • 3,764
  • 19
  • 23
1

I would guess/expect that the java version would be built into the executable.

cagcowboy
  • 27,443
  • 9
  • 65
  • 88