views:

1250

answers:

3

I am trying to run a batch file. the file is located here:

C:\Program Files\Java\jre6\bin\getfile.bat

I use this in oracle forms 6i: first i assign this path to a variable:

tmp_msg := 'C:\Program Files\Java\jre6\bin\getfile.bat'

then I use the host command:

host( 'cmd /c' || tmp_msg, no_screen);

This is exactly as I have it. It doesn't give me an error, but I don't get the result that I'm expecting. I'm actually executing java code in the batch file like so: java -classpath path;addedpackage.jar myClass

I hope someone can help me with this. Thank you.

+1  A: 

It looks like you need a space after /c:

host( 'cmd /c ' || tmp_msg, no_screen);
AndyDan
A: 

I got the command to work. The reason it wasn't working was because the function (block) i had it in wasn't getting executed. Oracle forms are sometimes tricky. this worked: host(tmp_msg);

berto77
A: 

you need to use command like this

host('cmd /c start '||filename, no_screen);

nasreen