Execute .exe File With Arguments From CaptiveRuntime Air Application

Hello,
We have an AIR application compiled as a Captive Runtime app. We need to launch a Native Process (an exe file) on application startup and pass some arguments to that exe. Are there any examples on how to do this? Any resources we can look at for guidence?
Thanks!

Hi,
You need to use Integration technology like BlazeDS or LCDS.

Similar Messages

  • PL/SQL to execute exe file with parameters from DB

    Hi all,
    I have a bit of a problem.
    I am in need to write all Logon, Logoff and Logon fail data onto the Windows Application Log. To do this I already tried various solutions but with my configuration (Oracle EE 10.2.0.4 and Windows Server 2003 R2 X64) the only possible solution (apparently) is the following.
    I create a Table with the info I need:
    CREATE TABLE logonaudittable
    event VARCHAR2(15),
    sid NUMBER,
    serial# NUMBER,
    orario DATE,
    username VARCHAR2(30),
    osuserid VARCHAR2(30),
    machinename VARCHAR2(64)
    I create a trigger for Logon Data, one for Logoff and one for Logon Fail:
    LOGON trigger.
    CREATE OR REPLACE TRIGGER logonauditing AFTER LOGON ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END;
    LOGOFF trigger
    CREATE OR REPLACE TRIGGER logoffauditing
    BEFORE LOGOFF ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGOFF', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END;
    LOGON FAIL trigger
    CREATE OR REPLACE TRIGGER logonfailauditing
    AFTER SERVERERROR ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    IF (IS_SERVERERROR(1017)) THEN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'FAILLOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END IF;
    END;
    The I create a trigger that starts every time something is written on the table.
    This trigger needs to start an EXE file that writes the latest data written on the table into the Windows Application Log.
    So I need a trigger that executes my WRITELOG.EXE file adding the parameters. For example:
    Execute WRITELOG.EXE event sid orario username
    So my program will write a Log in Windows with this data:
    Event: LOGON
    Sid: 2938473
    Orario: 12/12/2011 11:45:32
    Username: Scott
    And so on.
    I already have the program that does this, I need to execute the program with the right data directly from trigger or from a procedure executed by my trigger.
    Hope I've been clear and REALLY hope someone can help me!!!
    Thank you all!

    The java and PL/SQL you need to set up is in the very first response in the link. (I don't have a windows Oracle DB DBMS_JAVA to try it myself). Change the UNIX command '/usr/bin/ls' to your Windows command 'c:\yourdirectory\FILE.EXE'. Assuming you created everything and set permissions as Tom describes (later in the thread), your PL/SQL call in your trigger might look something like this:
    CREATE OR REPLACE TRIGGER logonauditing AFTER LOGON ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    RUN_CMD('c:\yourdirectory\FILE.EXE LOGON '||v_sid||' '||v_serial||' '||to_char(sysdate,'MM/DD/YYYY')||' '||user||' '||osuserid||' '||machinename);
    CLOSE c1;
    END;
    Since you want to log what the trigger is writing to the table, you can call the executable with the same information you are writing, instead of writing then reading it back out again.

  • How can I execute a java class with arguments from an air application built from mxml?

    I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
    java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
    where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
    How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

    Hi,
    You need to use Integration technology like BlazeDS or LCDS.

  • Run a .exe file with parameters from my java code

    Hi, I want to run a .exe file from my java program. This .exe file will take some parameters in the command line. I need
    to supply that to the program as well. Can someone help me in this please?
    Thanks in advance.

    I am trying like this:
    public class lauch_ext {
         public static void main(String[] args) throws Exception{
              try {
                Runtime rt = Runtime.getRuntime();
                Process pr = rt.exec("C:\\Apps\\myapp.exe arg1 -arg2 return_arg");
                BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                String line=null;
                while((line=input.readLine()) != null) {
                    System.out.println(line);
                int exitVal = pr.waitFor();
                System.out.println("Exited with error code "+exitVal);
            } catch(Exception e) {
                System.out.println(e.toString());
                e.printStackTrace();
    }

  • How to execute one .exe file with as3 in air ?

    Hi
    How to execute one .exe file with as3 in air?
    I want do this work without fscommand .
    plize help me .

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

  • Reg : Executing .exe file from application server

    Dear Experts,
                        i have a requirement to execute an .exe file from application server,i tried with method CL_GUI_FRONTEND_SERVICES=>EXECUTE but it executes .exe file from presentation server only.can
    anyone kindly clarify to execute .exe file from application server?
    Thanks in advance,
    Sujay

    Hi,
    Did you search before posting?
    Re: Execute a .exe file present in the Application Server
    Vikranth

  • Executing exe files from java program

    Hi,
    I need to execute exe files and pass arguments to them from my java code.
    Can you give me guidelines to do that as i haven't done that before.
    Thanks.

    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    getRuntime() method.
    exec() method.

  • How To Run An External .exe File With Command Line Arguments

    Hiya, could anyone tell me how I can run an external .exe file with command line arguments in Java, and if possible catch any printouts the external .exe file prints to the command line.
    Thanks.

    Using the Runtime.exec() command. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Labview- .EXE file with excel template

    How to create a .exe file from the .vi file with excel template. Since I am giving only .exe file, the client wont be having the excel templates. So please tell me how to build a .exe file with templates which will be invoked by mainfile.vi. Please let me know if U guys know. (Now in my mainfile.vi I am using local file location path to invoke)

    Hi saamy,
    I have tested it out at my PC and it is working.
    I have tested with MS office report and put the template "Excel Template.xlt" under VI's folder (C:\temp) and make the exe file.
    After the exe file has been moved to other place(C:\build) and has been executed, the exe file try to locate  "Excel Template.xlt" under both C:\temp and C:\build. As long as the template is the same folder with exe file, it is working.
    Pls refer to attached file.
    Hopefully it will help. Please let me know the result.
    Thanks & Regards,
    Steve
    Attachments:
    My Application.zip ‏4415 KB

  • How to run jar files with arguments?

    Hi everybody,
    Is it possible to run a jar file with arguments passed to its MAIN class?
    If yes can you help me on how to do it?
    Thanx

    I am in complete agreement with FahleE. I'll refine it a bit.
    On my machine (running RedHatLinux8.0) you can run the demos like this.
    1. open a console window
    2. go to the directory where the demo you wish to run, say, demo.jar, is located
    for instance for the SwingSet2-demo
    cd /usr/lib/java/demo/jfc/SwingSet2
    3. run the jar file
    java -jar demo.jar
    In order to run it windows style, ie, launching by double clicking, save these lines in a file called
    LaunchJar.sh
    cd /usr/lib/java/demo/jfc/SwingSet2
    java -jar demo.jar
    where demo.jar is the jar file you want to run.
    Right click on the LaunchJar.sh and go to the 'Properties' tab. Check the 'Execute' permissions for Owner/groups/others. You can also do the same thing by chmod command.
    Now double-click on the LaunchJar.sh file: your application should be launched.
    Palash.
    Please Note: It is important to set the path variable to your JAVA_HOME directory....
    Otherwise, instead of
    java -jar demo.jar, you will need to use the full path to your JAVA_HOME/bin directory like:
    JAVA_HOME/bin /java -jar demo.jar.
    Where JAVA_HOME is the directory where you have installed java. Typically it is usr/java or usr/local/java

  • How to create a .exe file with eclipse 3.1

    Hello every body. I want to know how create a .exe file with eclipse 3.1. A friend tell me it's possible but he forgot how ! So I ask my question ay you, how can I do that? I think it's like in Dev-C++, when he compiling the programme he create
    a .exe file but in eclipse, i don't know how do that. Please help me, I have finish some programs but I don't know how create .exe file for give their at my friend.
    Thank's.
    P.S : I'm a young french so maybe there are some mistake on my post. I hope you understand it.

    There might be a plugin in eclipse to do this, but I don't know what it is.
    The normal way to deploy a program is to create an executable jar file. This will be a .jar not a .exe.
    Or you can try ggogle.
    http://www.google.co.uk/search?q=java+exe

  • Executing a file with Java?

    Hi,
    I wanted to know how I could execute a file with java. Here are a couple scenarios - let's say I am developing an anti-spyware utility and I wanted to first write a batch file, and then create it in a folder, then run it when they click "Run". Then afterwards I want to shutdown their computer.
    My Mindset:
    - FileWriter to create the .bat and write the Batch commands.
    - Execute the batch file.
    - Execute the shutdown.exe file to reboot their PC.
    So my simple question is, how can I execute a file?
    Thanks!
    -Josh

    Well here is the code I have:
                try
                    Runtime.getRuntime().exec("cmd.exe /c test.bat");
                catch(IOException e1)
                    //NOTHING
                }Now my cmd.exe is obviously in my Windows System32 folder, and my "test.bat" file is in my C:\ root directory. So I am wondering why that wont execute. I tried a fer other things too like:
    Runtime.getRuntime().exec("cmd.exe  c:\test.bat");that didn't work either, because you can't have a "\" in a string...
    So how can I get this thing to execute the batch file?

  • Looking for help for sharing pdf files with ipad from mac.  Pages only recognizes text.  What app should I use for file sharing pdf documents?

    Looking for advice on how to share pdf files with iPad from Mac.   Pages seems to only recognize text.   What app is recommended for pdf documents?

    Welcome to Apple Support Communities!
    If I understand your question, you want to read pdfs on your iPad, not create or edit.
    Drag pdf files to the iPad icon in Finder while connected to your computer via the USB cable.
    They will show up in the iBooks application
    (If you don't already have iBooks, it's a free download from the App Store.)
    Once installed, there are two buttons at the top left of the Bookshelf.
    One is Books, the other is Collections.
    Tap Collections, and you'll see Books and PDFs.
    Tap PDFs and you're there.

  • Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    is that the eos 5d?
    if so, you only need cr 3.3 or greater.  what version do you have in your cs4? (help>about plugins>camera raw)
    if you need to update it, http://www.adobe.com/downloads/updates/

  • Viewing .exe file with video

    I am trying to extract an exe file with client video that is theirs. Is there a way to extract this? All efforts have failed.

    Any file that comes into your Mac without a proper suffix or extension can appear to the OS to be a .exe. Try changing the extension to .mov, .flv, or .wmv and see what happens.
    fi that does not work, your client must provide you with a proper media file.
    bogiesan

Maybe you are looking for