olddave [https://community.jboss.org/people/olddave] created the discussion
"Action script - how to invoke an executable?" To view the discussion, visit: https://community.jboss.org/message/647418#647418 -------------------------------------------------------------- Hi, This action script will give you the idea of what I need to do [code] String osname = System.getProperty("os.name"); if(osname.equals("Linux")) { Runtime.getRuntime().exec("wineconsole --backend=user "/vendor_files/bbg_ps_enc/des.exe -D -u -k \"xcvfrew\" /vendor_files/bbg_ps_enc/equity_desc.enc.out /vendor_files/bbg_ps_out/equity_desc.out"); } else if(osname.indexOf("Windows") == 0) { Runtime.getRuntime().exec("cmd /c C:/vendor_files/bbg_ps_enc/des.exe -D -u -k \"xcvfrew\" C:/vendor_files/bbg_ps_enc/equity_desc.enc.out C:/vendor_files/bbg_ps_out/equity_desc.out"); } [/code] The Window specific command works fine. The Linux command never works. I have substituted the Linux cd with this "/vendor_files/bbg_ps_enc/rundes.sh" and that does not work either. Where rundes.sh has [code] #!/bin/bash wineconsole --backend=user /vendor_files/bbg_ps_enc/des.exe -D -u -k "xcvfrew" /vendor_files/bbg_ps_enc/equity_desc.enc.out /vendor_files/bbg_ps_out/equity_desc.out [/code] I have tried both mvel and java types for the Action script I have tried [code] "/bin/bash -c 'wineconsole --backend=user "/vendor_files/bbg_ps_enc/des.exe -D -u -k \"xcvfrew\" /vendor_files/bbg_ps_enc/equity_desc.enc.out /vendor_files/bbg_ps_out/equity_desc.out'" [/code] I tried adding the full path for wineconsole too, no change. And all combinations of the above. All these commands work perfectly inside a shell window. These techniques have been gleaned from a number of articles on the web about how to use Runtime.exec, but they do not appear to work within Drools So is it possible? If so how? Thx. Ed -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/647418#647418] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
