Sürüm için Internet Explorer Registry Entry
'u kullanabilirsiniz. Runtime sınıfını kullanarak java'dan Reg Query
uygulamasını çalıştırabilirsiniz. Reg Query, Windows kayıt defteri girdilerini sorgulamak için bir komut satırı aracıdır.
Process p = Runtime.getRuntime().exec("reg query \"HKLM\\Software\\Microsoft\\Internet Explorer\" /v Version");
Komple kodu:
ArrayList<String> output = new ArrayList<String>()
Process p = Runtime.getRuntime().exec("reg query \"HKLM\\Software\\Microsoft\\Internet Explorer\" /v Version");
BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()),8*1024);
BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()))
String s = null;
System.out.println("Here is the standard output of the command:\n");
while ((s = stdInput.readLine()) != null)
output.add(s)
String internet_explorer_value = (output.get(2));
String version = internet_explorer_value.trim().split(" ")[2];
System.out.println(version);
Çıktı = benim komut istemi reg query
ait 9.0.8112.16421
Çıktı
HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Internet Explorer
Sürüm REG_SZ 9.0.8112.16421
olası yinelenen (http://stackoverflow.com/questions/8916924/how-to- [Java Internet Explorer'ın sürümünü kontrol yöntemi] check-internet-kaşif-sürümü-in-java) –
@TomaszNurkiewicz: Ben katılmıyorum. Bu aslında gerçek bir soru. –
@EdwardThomson Katılıyorum, ancak OP'nin orijinal soruları düzeltmeyi öğrenmek zorunda kalmasına rağmen, sadece biraz değiştirilmiş bir sürümü yeniden sormak yerine –