Execute batch command from flex builder

When I click the "Run" button in Flex builder 3, I would like to execute a batch file.  It seems like in the Run settings, it only likes html and flash files. Other file types open in a flash environment  Anyone know of a workaround?

Have a look at External Tools and see if that does what you want.
On the main menu bar in Flex Builder there's an "External Tools" icon, click its arrow and select -> Open External Tools Dialog..
Or from the menu, select "Run" -> "External Tools" -> "Open External Tools Dialog..."
You can add a new configuration there and do all kinds of stuff (like creating docs using ASDoc, etc..)

Similar Messages

  • Executing windows batch commands from linux

    Hi,
    Kindly shed some light on executing the MSwindows batch commands from linux machine.
    Thanks
    RKA

    hi RKA
    What about using a virtual windows machine ? Or use a DOSemu (DOS Emulator) is a program that lets you run many of your favorite DOS applications under Linux.
    Why do you need to execute MSwindows batch commands ?
    Please explain.
    Edited by: Hub on Nov 12, 2008 1:56 PM

  • Executing batch file from Java stored procedure hang

    Dears,
    I'm using the following code to execute batch file from Java Stored procedure, which is working fine from Java IDE JDeveloper 10.1.3.4.
    public static String runFile(String drive)
    String result = "";
    String content = "echo off\n" + "vol " + drive + ": | find /i \"Serial Number is\"";
    try {
    File directory = new File(drive + ":");
    File file = File.createTempFile("bb1", ".bat", directory);
    file.deleteOnExit();
    FileWriter fw = new java.io.FileWriter(file);
    fw.write(content);
    fw.close();
    // The next line is the command causing the problem
    Process p = Runtime.getRuntime().exec("cmd.exe /c " + file.getPath());
    BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    while ((line = input.readLine()) != null)
    result += line;
    input.close();
    file.delete();
    result = result.substring( result.lastIndexOf( ' ' )).trim();
    } catch (Exception e) {
    e.printStackTrace();
    result = e.getClass().getName() + " : " + e.getMessage();
    return result;
    The above code is used in getting the volume of a drive on windows, something like "80EC-C230"
    I gave the SYSTEM schema the required privilege to execute the code.
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    GRANT JAVAUSERPRIV TO SYSTEM;
    I have used the following to load the class in Oracle 9ir2 DB:
    loadjava -u [system/******@orcl|mailto:system/******@orcl] -v -resolve C:\Server\src\net\dev\Util.java
    CREATE FUNCTION A1(drive IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'net.dev.Util.a1(java.lang.String) return java.lang.String';
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    The problem that it hangs when I execute the call to the function (I have indicated the line causing the problem in a comment in the code).
    I have seen similar problems on other forums, but no solution posted
    [http://oracle.ittoolbox.com/groups/technical-functional/oracle-jdeveloper-l/run-an-exe-file-using-oracle-database-trigger-1567662]
    I have posted this in JDeveloper forum ([t-853821]) but suggested to post for forum in DB.
    Can anyne help?

    Dear Peter,
    You are totally right, I got this as mistake copy paste. I'm just having a Java utility for running external files outside Oracle DB, this is the method runFile()
    I'm passing it the content of script and names of file to be created on the fly and executed then deleted, sorry for the mistake in creating caller function.
    The main point, how I claim that the line in code where creating external process is the problem. I have tried the code with commenting this line and it was working ok, I made this to make sure of the permission required that I need to give to the schema passing security permission problems.
    The function script is running perfect if I'm executing vbs script outside Oracle using something like "cscript //NoLogo aaa1.vbs", but when I use the command line the call just never returns to me "cmd.exe /c bb1.bat".
    where content of bb1.bat as follows:
    echo off
    vol C: | find /i "Serial Number is"
    The above batch file just get the serial number of hard drive assigned when windows formatted HD.
    Same code runs outside Oracle just fine, but inside Oracle doesn't return if I exectued the following:
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    Never returns
    Thanks for tracing teh issue to that details ;) hope you coul help.

  • Unable to execute Linux command from Java

    Hi,
    I am currently working on a code wherein i need to execute Linux command from Java. Below are some of the query i have.
    1) Is there any efficient method of running OS commands from Java, rather than using Runtime and Process method.
    2) Below is details of my code which fails in execution
    **-- Java Version**
    java version "1.6.0"
    OpenJDK Runtime Environment (build 1.6.0-b09)
    OpenJDK Server VM (build 1.6.0-b09, mixed mode)
    -- Program Code ----
    Where <path> = Path i put myself
    package test;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.io.*;
    public class GetInode{
         * @param args
         public static void main(String[] args) {
              GetInode test = new GetInode();
              test.getInode();
         public void getInode(){                    
              String command = "/usr/bin/stat -Lt <path>;
              System.out.println(command);
              Process process;
              Runtime rt;     
              try{
              rt = Runtime.getRuntime();               
              process = rt.exec(command);
              InputStreamReader isr = new InputStreamReader(process.getErrorStream());
              BufferedReader bre = new BufferedReader(isr);
              BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream());
              System.out.println(bre.readLine());
    System.out.println(br.readLine().split(" ")[7]);
              process.destroy();          
              }catch (Exception ex){
                   System.out.println("Error :- " + ex.getMessage());
    ------Output -------------
    /usr/bin/stat -Lt "<path>"
    /usr/bin/stat: cannot stat `"<path>"': No such file or directory
    Error :- null
    Can any one help me what is wrong and why i am unable to run the Linux command from Java.

    For clarity purpose............i m submitting actual code here
    --- Code ---
    package test;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.io.*;
    public class GetInode{
    * @param args
    public static void main(String[] args) {
    GetInode test = new GetInode();
    test.getInode();
    public void getInode(){               
    String command = "/usr/bin/stat -Lt \"/afs/inf.ed.ac.uk/user/s08/s0898671/workspace/CASWESBLIN/TestFS/01_FIL_01.txt.txt\"";
    System.out.println(command);
    Process process;
    Runtime rt;
    try{
    rt = Runtime.getRuntime();
    process = rt.exec(command);
    InputStreamReader isr = new InputStreamReader(process.getErrorStream());
    BufferedReader bre = new BufferedReader(isr);
    BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream()));
    System.out.println(bre.readLine());
    System.out.println(br.readLine().split(" ")[7]);
    process.destroy();
    }catch (Exception ex){
    System.out.println("Error :- " + ex.getMessage());
    --- Output ---
    [ratz]s0898671: java GetInode
    /usr/bin/stat -Lt "/afs/inf.ed.ac.uk/user/s08/s0898671/workspace/CASWESBLIN/TestFS/01_FIL_01.txt.txt"
    /usr/bin/stat: cannot stat `"/afs/inf.ed.ac.uk/user/s08/s0898671/workspace/CASWESBLIN/TestFS/01_FIL_01.txt.txt"': No such file or directory
    Error :- null
    -- Linux Terminal --
    If i copy the first line from the output and execute on Linux terminal her is the output that i get
    [ratz]s0898671: /usr/bin/stat -Lt "/afs/inf.ed.ac.uk/user/s08/s0898671/workspace/CASWESBLIN/TestFS/01_FIL_01.txt.txt"
    /afs/inf.ed.ac.uk/user/s08/s0898671/workspace/CASWESBLIN/TestFS/01_FIL_01.txt.txt 12003 24 81a4 453166 10000 1c 360466554 2 0 1 1246638450 1246638450 1246638450 4096
    Can you just assist me where am i really making mistake.......i was wondering if the command that i pass from Java....can be executed on Linux terminal why is it faling to run from java.........and when i print the Error Stream for process output........it show cannot Stat.......

  • How to execute unix command from ODI Procedure

    Hi,
    I am trying to execute below unix command from ODI Procedure (Command on Target tab) but I am getting the error "java.io.IOException: Cannot run program "cd": error=2, No such file or directory" but when I try to execute the same command using OdiOSCommand, it is executing successfully. I don't want to use shell script to execute this command. Is there any specific syntax am I missing to execute this command from ODI procedure?
    cd /project3/tmt/;ls *.dmp > dmplist.lst
    Please help me on this...
    Thanks
    MT

    Hi nahlikh,
    Thank you for the reply.
    I used below command in Procedure but still getting the same error as "java.io.IOException: Cannot run program "OdiOSCommand": error=2, No such file or directory".
    OdiOSCommand "-COMMAND=cd /project3/tmt/;ls *.dmp > dmplist.lst"
    as I mentioned earlier if I use the command cd /project3/tmt/;ls *.dmp > dmplist.lst in OdiOSCommand tool it is executing successfully without any issues.
    any thoughts appreciated to get a solution for this issue.
    Thanks
    MT

  • Design view not working after importing project from Flex Builder

    After importing a project from Flex Builder to Flash Builder I am no longer able to see anything in the design view. I am using the flex 4.5 sdk.
    Any idea how I can get this design view working? I heard it could have something to do with the metadata directory but am slightly lost here?...
    Adam

    Could you please provide more information as to what exactly are you importing. Also does Design View not lauch at all or does it give errors. Would it be possible for you to share the logs.
    Meanwhile you can try cleaning the workspace and importing again to see if that solves the issue.

  • Issues migrating from Flex Builder 3 to Flash Builder 4.5

    Migrating from Flex Builder 3 (SDK 3.5) to Flash Builder 4.5 (SDK 4.5). Using Flex 3 compatibility mode. Flash Player 10.2. MX only components set.
    Issue 1. A DataGridColumn error per:  Description Resource Path Location Type
    Declaration of style 'direction' conflicts with previous declaration in C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.0\frameworks\libs\mx\mx.swc(mx.controls.dataGridClasses:DataGridColumn). SPT_GUI  Unknown Flex Problem
    Issue 2. Using Cairngorm 2. Have a class 'Bindable] public class GuiModel implements ModelLocator'. Now getInstance() is not defined per: private var model : GuiModel = GuiModel .getInstance(). Does Cairngorm 3 have to be used with Flash Builder 4.5?
    What has to be done to resolve these issues?

    Issue 2: Have you defined the static variable to hold the instance of the model locator? Also, have you defined a static method to return the model locator's instance?

  • Building from flex builder vs ant task

    I have a flex application written using flex builder. When I
    build it and run it using flex builder, or create an air file from
    flex builder and run that, then my application works just fine.
    However, I would like people without copies of flexBuilder
    installed to be able to build my application, so I am using the
    flex ant task (flex-mxmlc) to build my application. As far as I can
    tell I have the same configuration, and the same libraries included
    in the ant task. However, when I run the air file generated by the
    ant task nothing happens. If you look in the task manager, you can
    see that the application is running, but the main window for the
    application never appears.
    I tried running the swf through a debug version of flash to
    get some log output, and I am getting a bunch of exceptions, the
    first of which is:
    VerifyError: Error #1014: Class flash.display::NativeWindow
    could not be found.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()
    at
    mx.managers::SystemManager/preloader_initProgressHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    It seems like it might not be finding the main flex library
    (flexlib.swc), is that where that class would be? In my ant task I
    have an include-libraries tag that points to that file.
    Anyone have any ideas?

    I experienced a similar problem (although the class that
    could not be found was different for me). Googling around I found
    someone who had a similar problem and claimed that using the
    flexlib.swc library was the culprit.
    The root of the problem is that the Flex SDK that comes
    bundled with the Flex Builder has libraries (under frameworks/libs)
    that are NOT included in plain free Flex SDK that you and I are
    presumably using on our build machines.
    When flexlib.swc is linked in, it causes certain classes to
    be required at runtime. Apparently when you compile these classes
    are linked in if available, but when they are not the compilation
    still succeeds. Only you get a VerifyError when you run the thing.
    What worked for me was to copy all the additional .swc files
    found in my Flex Builder SDK's frameworks/libs directory to the
    same directory on my build machine. Also you will need to copy the
    additional files under frameworks/locale/en_US.
    Rebuild and clear your browser's cache and it should then
    work.

  • How to execute Linux command from Java app.

    Hi all,
    Could anyone show me how to execute Linux command from Java app. For example, I have the need to execute the "ls" command from my Java app (which is running on the Linux machine), how should I write the codes?
    Thanks a lot,

    You can use "built-in" shell commands, you just need to invoke the shell and tell it to run the command. See the -c switch in the man page for your shell. But, "ls" isn't built-in anyays.
    If you use exec, you will want to set the directory with the dir argument to exec, or add it to the command or cmdarray. See the API for the variants of java.lang.Runtime.exec(). (If you're invoking it repeatedly, you can most likely modify a cmdarray more efficiently than having exec() decompose your command).
    You will also definitely want to save the returned Process and read the output from it (possibly stderr too and get an exit status). See API for java.lang.Process. Here's an example
    java.io.BufferedReader br =
    new java.io.BufferedReader(new java.io.InputStreamReader(
    Runtime.getRuntime().exec ("/sbin/ifconfig ppp0").
    getInputStream()));
    while ((s = br.readLine()) != null) {...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Execute DOS command from SAP

    hi experts ,
    i need to execute DOS command from SAP .
    earlier we have 'GUI_EXEC' WS_EXECUTE , 'WS_DOWNLOAD' etc which are Obsolete now.
    as we are using ECC6.0. kindly guide how to do this.
    best regards,
    Rahul

    Try out...
    DSVAS_DOC_WS_EXECUTE_50
    or
    CL_GUI_FRONTEND_SERVICES=>EXECUTE
    <b><REMOVED BY MODERATOR></b>
    Thanks & Regards
    ilesh 24x7
    Message was edited by:
            Alvaro Tejada Galindo

  • Execute a command from servlet

    Hello,
    How can I execute this command from a servlet ?
    example: I want execute "java -cp /root/:/root/log/api/:/root/log/apps/ Transmitter" when I lunch servlet1.java
    so which class in JAVA can do this ?
    Thanks ?

    why u want to run another program? Usually you call the methods within the second program.
    Is it possible to invoke another program in the server using a servlet? If so it could even mess up the whole server. I am not sure.

  • Execute linux command from java

    I wanna execute linux command from java, bu the output has error:
    Return code = 1
    top: failed tty get
    The code as:
    import java.io.*;
    public class Execute {
         public static void main(String[] args) {
              try {
                   final Process process = Runtime.getRuntime().exec("top");
                   new Thread() {
                        public void run() {
                             try {
                                  InputStream is = process.getInputStream();
                                  byte[] buffer = new byte[1024];
                                  for (int count = 0; (count = is.read(buffer)) >= 0;) {
                                       System.out.write(buffer, 0, count);
                             } catch (Exception e) {
                                  e.printStackTrace();
                   }.start();
                   new Thread() {
                        public void run() {
                             try {
                                  InputStream is = process.getErrorStream();
                                  byte[] buffer = new byte[1024];
                                  for (int count = 0; (count = is.read(buffer)) >= 0;) {
                                       System.err.write(buffer, 0, count);
                             } catch (Exception e) {
                                  e.printStackTrace();
                   }.start();
                   int returnCode = process.waitFor();
                   System.out.println("Return code = " + returnCode);
              } catch (Exception e) {
                   e.printStackTrace();
    }Help please.

    Your code is probably good to run a program, that does not use terminal capabilities.
    Program "top" is a little bit more complicated - you have to run it with a real terminal.
    Try to run "xterm -e top". You can find an example how to run an external program
    from java code in cnd/gdb module on http://cnd.netbeans.org
    For example, take a look at openExternalProgramIOWindow() method on this page:
    http://cnd.netbeans.org/source/browse/cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/proxy/Attic/GdbProxyCL.java?rev=1.1.2.6.2.5&only_with_tag=release551_fixes&view=markup
    It runs a command with external terminal.
    Thanks,
    Nik

  • Execute shell command from Java

    Hi all,
    I need some idea for executing shell script from Java programe.
    For example i have start.sh script in /tmp/start.sh  folder of unix server.
    I want to execute shell script from local java code.
    Any idea on this.

    Hi,
           Read the following articles/posts, maybe this could help you:
          How to execute shell command from Java
    Running system commands in Java applications | java exec example | alvinalexander.com
    Want to invoke a linux shell command from Java - Stack Overflow

  • Upgrade from Flex Builder 3.1 to Flash Builder 4.5

    I have several project in Flex Builder 3.1 now.
    What is the best way to move them in Flash Builder 4.5? Can I just use the workspace from Flex Builder 3.1 in Flash Builder 4.5?
    Is Flex 4.5 backward compatible at API level?

    You should always have separate workspaces for separate versions of Flash Builder.
    Flex 3 and Flex 4 have some large differences.  You will probably want to spend some time reading about migrating by searching on Google.  Here is a good place to start: http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html

  • Issue with Executing OS commands from Stored Procedure

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    ===============================================================
    Issue with Executing OS commands from Stored Procedure
    ==============================================================

Maybe you are looking for

  • Flash chart error: scroller position should be positive and integer

    Hi I am periodically getting this error when running a flash chart. It seems to be related to the amount of data that I am using. Any Idea whats causing it and how to resolve it Keith

  • URGENT:- HFM 9.3.1 Workspace does not show the Studio changes

    Hi All, I am trying to make changes in a report in Hyperion Reporting Studio. After saving the Report in Studio if ran in the web i.e Hyperion Workspace, then it does not reflect the changes. This is only occurring for this particular report. Also ch

  • A litle question in Swing.

    Hello I have a litle question in Swing. when i add a component to a frame where on the frame it adds the component? for example , I have a frame and it has a content pane. and i do like that myPanel.add(myButton); or myPanel.add(myTextField); to wher

  • Need to have an applet in web browser-- HELP

    I have been trying to have the prefuse Graphview applet in a web browser... The following is my HTML file <html> <head> <title>Prefuse Demo</title> </head> <body> <applet code="GraphView.class" archive="demos.jar,prefuse.jar,prefuse.src.jar" width="4

  • Maximum number of contacts for Symbian phone

    Hi, Anyone knows what is the maximum number of contacts one can store for their Symbian phone? For example, I am using N95 8GB. I loaded in 5000 numbers and I have nothing else in the phone. When I try to access to the phone book, phone prompts me "M