Programmatically determine what JDK/JRE's are installed on my box

前端 未结 3 1244
旧时难觅i
旧时难觅i 2021-01-02 06:18

Is there a standard way to do this? I realize this can be somewhat platform dependent. Our product right now is only supported on Windows - so I suppose that\'s what I\'m

3条回答
  •  失恋的感觉
    2021-01-02 06:59

    I'd probably go for a combination of looking for the Java installed registry keys and crawling the default locations for installation (which shouldn't take too long).

    An alternative approach would be to bundle a tiny Java application which prints various details such as the running JVM.

提交回复
热议问题