开发者

Path resolution without PATH variable

I installed the latest JDK 1.6.0_25 on my Windows 7 64-bit machine. I then tried "java -开发者_Go百科version" on the command prompt, without editing the path variable. It worked, so I assumed that the installation added the new path to the environment.

But when I looked at the path variable through the Advanced System Settings tab, there was no sign of "C:\Program Files (x86)\Java\jdk1.6.0_25\bin\" or anything equivalent to it.

How is the path getting resolved?


If you're on Windows Server 2003, Vista, or Windows 7, you can try the where command:

C:\>where java

For anyone using Linux, the where equivalent is whereis.


it is kept in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment Java install a small exe in the system folder that looks up the keep and redirects there, so no PATH necessary.

Linux version usually uses update-alternatives (depends on the distribution, of course)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜