Kashub's Code Barn - "wc3270"

podświetlone jako text (dodał(a) ja @ 2020-03-05 10:48:35)

Twoja wyszukiwarka
Parcel ABC
Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
  private void createSessionWC3270(String sessionParms){
 
        ProcessBuilder p = new ProcessBuilder();
        File tempFile = new File("C:\\Program Files\\wc3270\\");
        System.out.println("1: " + tempFile.getAbsolutePath());
        if (tempFile.exists()){
            Thread openConsoleT = new Thread(new Runnable() {
                @Override
                public void run() {
                    try {
                        System.out.println("powershell \"& '" + "start cmd.exe /C \"C:\\Program Files\\wc3270\\wc3270.exe\" " + sessionParms +  "'\"");
                        Process p = Runtime.getRuntime().exec("powershell \"& '" + "C:\\Program Files\\wc3270\\wc3270.exe " + sessionParms +  "'\"");
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            });
            openConsoleT.start();
        }else{
            tempFile = new File(("C:\\Program Files (x86)\\IBM\\wc3270\\"));
            if (tempFile.exists()){
                Thread openConsoleT = new Thread(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            System.out.println("powershell \"& '" + "C:\\Program Files (x86)\\wc3270\\wc3270.exe " + sessionParms +  "'\"");
                            Process p = Runtime.getRuntime().exec("powershell \"& '" + "C:\\Program Files (x86)\\wc3270\\wc3270.exe " + sessionParms +  "'\"");
                        } catch (IOException e) {
                            e.printStackTrace();
                        }
                    }
                });
                openConsoleT.start();
            }
 
        }
       // Process p = Runtime.getRuntime().exec("powershell \"& '" + "wc3270.exe" + sessionParms +  "'\"");
 
 
    }
| Sklepy internetowe | | Sklep z artykułami RTV/AGD | | Programista Trójmiasto | | Darmowe Blogi | | Gdzie przenieść blog za darmo? | | Wklejacz kodów | | Skracacz linków | | Gnieżdżewo | | Smutne Opisy |