Merhaba javada exe dosyası çalıştırmak istiyorum bir kod buldum ama bu sadece windows uygulamalarını çalıştırıyor sanırım, ben herhangi bir setup dosyasını çalıştırmak istiyorum yardım eder misiniz
public class X { public static void main(String args[]) { Runtime r = Runtime.getRuntime(); Process p = null; try { p = r.exec("C:\\WINDOWS\\system32\\calc"); System.out.print("çalıştı"); } catch(Exception e) { System.out.print("çalışmadı"); } } }
public class X
{
public static void main(String args[])
{
Runtime r = Runtime.getRuntime();
Process p = null;
try
{
p = r.exec("C:\\WINDOWS\\system32\\calc");
System.out.print("çalıştı");
}
catch(Exception e)
{
System.out.print("çalışmadı");
}
}
}