/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package slippb_applet; /** * * @author Administrator */ public class SlipPB_Applet { /** * @param args the command line arguments */ public static void main(String[] args) { try { // TODO code application logic here String printingName = "fin_slip_pay"; String urlXmlData = ""; String ls_connect = "0:Data Source=centoracle11g/iorcl;Persist Security Info=True;User ID=scobkegat;Password=scobkegat;"; String urlXmlMaster = "http://localhost/EGAT/GCOOP/Saving/SlipApp/xml_printing_master.aspx?con_index=" + ls_connect + "&printing_name=" + printingName + "&printing_table=master"; String serverPBPath = "C:\\GCOOP_ALL\\EGAT\\GCOOP\\Saving\\SlipPB\\SlipPB"; String clientPBPath = "C:\\GCOOP_ALL\\EGAT\\GCOOP\\Saving\\SlipPB\\SlipPB"; //ใช้คำสั่ง command line เรียก pbslip.exe String[] cmd = {clientPBPath + "\\slippb.exe", printingName, urlXmlData, urlXmlMaster}; Process p = Runtime.getRuntime().exec(cmd); p.waitFor(); } catch (Exception ex) { ex.printStackTrace(); } } }