如何在Windows上检测已安装的Sun / Oracle JRE? [英] How can I detect the installed Sun/Oracle JRE on Windows?

查看:151
本文介绍了如何在Windows上检测已安装的Sun / Oracle JRE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用谷歌搜索答案,但我发现的只是如何从浏览器中检测Java的技巧或者只是启动Java的非常通用的方法,看它是否运行,这在我的应用程序中引入了可能很长的延迟。 (在我的机器上第一次启动时大约两秒钟)

I tried googling the answer, but all I found was tips on how to detect Java from a browser or the very generic way of just starting Java and see if it runs, which introduces a possibly long delay in my application. (~ two seconds when started the very first time on my machine)

如果以下限制适用,我希望有更快的方法:

I hope there is a faster way, if the following restrictions apply:


  • 仅限Sun / Oracle JRE或JDK

  • 仅限1.6及更高

  • 仅限Windows平台

  • 来自浏览器,但来自普通的旧Win32可执行文件

  • Only Sun/Oracle JREs or JDKs
  • Only 1.6 and higher
  • Only Windows platforms
  • Not from a browser, but from a plain old Win32 executable

此检测不适用于公共应用程序,仅适用于Windows平台上的内部使用。

This detection is not meant for a public application, but for internal use on Windows platforms only.

是否有可以读取的注册表路径或某些配置文件我可以解析吗?

Is there a registry path I can read or some configuration file I can parse?

推荐答案

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

这篇关于如何在Windows上检测已安装的Sun / Oracle JRE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆