import javax.swing.JOptionPane; import java.util.Scanner; public class Project1 { /** * @param args */ public static void main(String[] args) { OSdetails(); execute(); } public static void OSdetails() { String osName= System.getProperty("os.name"); System.out.println("Operating system name =>"+ osName); String osVersion= System.getProperty("os.version"); System.out.println("Operating system version =>"+ osVersion); String osArch= System.getProperty("os.arch"); System.out.println("Operating system name =>"+ osArch); //JOptionPane.showMessageDialog(null, osName +"\n"+ "Version: " +osVersion+ "\n"+ "Architecture: "+ osArch); } public static void execute() { Runtime r = Runtime.getRuntime(); System.out.print("Please enter a path "); Scanner Input = new Scanner(System.in); String path = Input.nextLine(); //String path = JOptionPane.showInputDialog("Please enter a path"); Process p = null; try { if(path != "") p=r.exec(path); //System.out.print(path); } catch(Exception e) { System.out.println("File Not found"); //execute(); } } }
*.bin
Linux
Java
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)