cancel
Showing results for 
Search instead for 
Did you mean: 

help!!!-external script (EXEC)

Former Member
0 Kudos

Hi all,

I need help!! please!!

I need to find out how the EXEC method can be used to specify the location of the external script.

Many thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

good

hi probably you r talking about java script exec() method, herewith i am sending some of the documents plz go through it, these might help you to solve your prob.

http://www.webreference.com/js/column5/methods.html

http://docs.sun.com/source/816-6408-10/regexp.htm

http://docs.sun.com/source/816-6408-10/regexp.htm

http://www.twdata.org/kokua/api/org/twdata/kokua/script/flow/javascript/JavaScriptInterpreter.html

thanks

mrutyun

Former Member
0 Kudos

Hi Mrutyunjaya

I have been watching the URL that you have sent to me, my problem is path, so that .bat that this in another machine is executed in mine, the code java is:

public class Test {

public static void main (String args[]) {

new Test().llamadaAScript();

}

private void llamadaAScript () {

try {

Process p = Runtime.getRuntime().exec("cmd.exe /C\"

maquinaRemota
Test
script.bat\"");

} catch (Exception e) {

}

}

}

It fails the call to me that not to be solved, .bat in my machine is not executed

very many thanks

Alfonso

Answers (1)

Answers (1)

Torsten_
Advisor
Advisor
0 Kudos

Hi,

I'm not sure I've understand your problem, but I try to answer :-]

On some unix system you can use the command: <b>which</b> to find the location for the specified command.

On windows system I dont belive that exists a similar command.

But when the command which you will execute with <b>Runtime.exec</b> is placed in a dirctory that set in the PATH variable it is enough to use the command without path.

Regard

Torsten

Former Member
0 Kudos

Hi Torsten,

Many thanks in advance for your help. What I have to do is the following:

I have to execute a script which is located in a external server. I doing it using Sap XI. Sap XI has the utility of create a simple java function and execute it from the message mapping. My question is How can I "say" where the server is, using the code Runtime.exec. I was studing this an here i only can specify the path but not the server.

Many thanks

Regards

Alfonso