c# - How to detect whether Java runtime is installed or not -


I program windows applications using Java and it creates the ".jar" file which is the ".exe" file is not. When a Java Runtime is not installed, the client computer opens the ".jar" file, then it runs as a store with winrar. To show the message box to the user to install the Java Runtime or to launch the ".jar" file using the Java Runtime, I need to know how to run the Java runtime or not, using the C # code. Whether or not the computer is installed on.

You can check the registry

  Registry RK = Registry local machine; Registry all = RK OpenSubby ("software \\ Java soft \\ Java runtime environment"); String current virion = subkeygate value ("current version"). Toasting ();  

Comments

Popular posts from this blog

MVP, design question -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -