Basically, I just need to write a simple java program to detect the version of my locally installed Internet Explorer.
There’s javascript code, but it runs within your browser. what I want is some code like this:
public class VersionTest
{
public static void main(String[] args)
{ System.out.println("you IE Version is:" + getIEVersion());
}
public static String getIEVersion()
{ //implementation that goes out and find the version of my locally installed IE
}
}
How do I do that? Thanks
you can use
Internet Explorer Registry Entryfor version. You can executeReg Queryfrom java using Runtime class. Reg Query is a command line tool to query registry entries in windows.Complete code:
Output =
9.0.8112.16421Output of
reg queryon my command prompt