Trying to run a bat file from oracle

I have followed these steps, see bottom for results, everything is valid but the bat file does not run???? PLease need your help. Doug
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "getbatx" AS
class getbatx //class pdfopen
public static void execmd(String c) //main function
try
System.out.println("Executing:" + c);
Runtime.getRuntime().exec("C:\\WINDOWS\\system32
cmd.exe /c "+c);
System.out.println("Executing:" + c + " ...done");
} catch (Exception e) //catch any exceptions here
System.out.println("Error" + e ); //print the error
CREATE OR REPLACE PROCEDURE host_command2 (p_command IN VARCHAR2)
AS LANGUAGE JAVA
NAME 'getbatx.execmd (java.lang.String)';
/Then as sysdba I put in in the following.
exec dbms_java.grant_permission( 'CAPRS', 'SYS:java.io.FilePermission', '<<ALL FILES>>', 'execute' );
EXEC Dbms_Java.Grant_Permission('CAPRS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
EXEC Dbms_Java.Grant_Permission('CAPRS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');Then I make the call.
SET SERVEROUTPUT ON SIZE 1000000
CALL DBMS_JAVA.SET_OUTPUT(1000000);
BEGIN
host_command2 (p_command => 'c:\mybook.bat');
END;
/***** I run this, it completes but does not run the bat file and there is no error message
SQL> BEGIN
2 host_command2 (p_command => 'mybook.bat');
3 END;
4 /
Executing:mybook.bat
Executing:mybook.bat ...done
PL/SQL procedure successfully completed.

Yes it should open a dos box, but you forgot to add the .bat file witch you like to run: String[] command = {"cmd", "/c", "start", "c:/Batch files/Cardiobackup/cardiobackup_v1.4"}

Similar Messages

  • Running a Bat file from a stored procedure

    This is part II of Re: Need to run bat file from application express
    I thought I would open a new thread
    I thought I had this fiqured out but it still doesn't work
    1) I granted CREATE EXTERNAL JOB to my user
    2) startup the OracleJobScheduler Service
    3)
    create or replace
    PROCEDURE RUN_OS_COMMAND(p_cmd IN varchar2)
    is
    v_job_exists pls_integer:=0;
    begin
      select count(1)
      into  v_job_exists
      from  all_scheduler_jobs
      where job_name='JAVA_EXE';
      if v_job_exists>0 then 
        dbms_scheduler.drop_job(job_name =>'JAVA_EXE');
      end if;
      dbms_scheduler.create_job
      (   job_name          =>'JAVA_EXE'
        , job_action        =>p_cmd
        , job_type          =>'executable'
        , enabled           =>false
        , auto_drop         =>false
        , start_date        =>systimestamp
      dbms_scheduler.run_job(job_name =>'JAVA_EXE');
    end;test.bat is del test.csv
    I run this
    begin
      RUN_OS_COMMAND('C:\temp\test.bat');
    end;
    / anonymous block completed
    It runs with no errors but does not run the bat file... what am i missing, thanks Doug

    LLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\wblincoe\Application Data
    CLASSPATH=.;[ORACLE_HOME]\jdbc\lib\ojdbc6.jar;c:\myjar\xdocore.jar;c:\myjar\i18nAPI_v3.jar;c:\myjar\xdoparser.jar;c:\myjar\xmlparserv2.jar
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=WBLINCOELT
    ComSpec=C:\WINDOWS\system32\cmd.exe
    DEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\wblincoe
    LDMS_LOCAL_DIR=C:\Program Files\LANDesk\LDClient\Data
    LOGONSERVER=\\03N-DAYT-DC01
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\OraHome_1\jre\1.4.2\bin\client;C:\OraHome_1\jre\1.4.2\bin;C:\app\wblincoe\product\11.1.0\db_1\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PERL5LIB=C:\oracle\product\10.2.0\http_1\sysman\admin\scripts;C:\oracle\product\10.2.0\http_1\perl\site\5.6.1\lib;C:\oracle\product\10.2.0\http_1\perl\site\5.6.1;C:\oracle\product\10.2.0\http_1\perl\5.6.1\lib\MSWin32-x86;C:\oracle\product\10.2.0\http_1\perl\lib\5.6.1;C:\oracle\product\10.2.0\http_1\perl\lib\5.6.1\MSWin32-x86;
    PHPRC=C:\Program Files\PHP\
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0f02
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\wblincoe\LOCALS~1\Temp
    TMP=C:\DOCUME~1\wblincoe\LOCALS~1\Temp
    USERDNSDOMAIN=CACI.COM
    USERDOMAIN=CACI
    USERNAME=wblincoe
    USERPROFILE=C:\Documents and Settings\wblincoe
    VSEDEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
    windir=C:\WINDOWS

  • Getting error while running ua.bat file of Oracle Data Integrator 12cR1 (12.1.2.0.0) version

    Hi,
    I am using windows 7 professional(service pack 1) 64 bit operating system.
    After installing the odi 12c (enterprise edition) by executing the odi_121200.jar file I am getting the following error while trying to run the ua.bat file.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [UPGAST-00056] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] error initializing upgrade plug-in for ODI.ODI1
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An unexpected error occurred initializing an upgrade plug-in.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Contact Oracle Support Services.  See the secondary error message for additional details.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
    java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at oracle.ias.update.plugin.Plugin.instantiatePlugin(Plugin.java:248)
      at oracle.ias.update.plugin.Plugin.<init>(Plugin.java:229)
      at oracle.ias.update.plugin.Plugin.getPlugin(Plugin.java:180)
      at oracle.ias.update.plan.PlanStep.getPlugin(PlanStep.java:335)
      at oracle.ias.update.plan.PlanString.<init>(PlanString.java:66)
      at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
      at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
      at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
      at oracle.ias.update.plan.Template.load(Template.java:161)
      at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
      at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
    Caused by: java.util.MissingResourceException: Can't find oracle.ias.update.plugin.odi.bundle.ODIResourceBundle bundle
      at java.util.logging.Logger.setupResourceInfo(Logger.java:1518)
      at java.util.logging.Logger.<init>(Logger.java:265)
      at java.util.logging.Logger.<init>(Logger.java:260)
      at oracle.ias.update.UpgradeLogger.<init>(UpgradeLogger.java:60)
      at oracle.ias.update.UpgradeLogger.getLogger(UpgradeLogger.java:93)
      at oracle.ias.update.LoggingManager.create(LoggingManager.java:249)
      at oracle.ias.update.plugin.UpgradePlugin.createPluginLogger(UpgradePlugin.java:195)
      at oracle.ias.update.plugin.UpgradePlugin.<init>(UpgradePlugin.java:181)
      at oracle.ias.update.plugin.odi.ODIPlugin.<init>(ODIPlugin.java:136)
      ... 17 more
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [UPGAST-00259] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An error occurred when loading or initializing the plug-in which prevents the getInitialValue method from executing.
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Review the log file for additional details.
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00251: An error occured reading Upgrade Descriptor file ODI\INSTALLATION\odi12cInstallation_1\odi\plugins\upgrade\odi.xml
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The file does not conform to the expected syntax.
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] See the secondary message for additional information. Contact Oracle Support.
    [2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
    [2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
    oracle.ias.update.exception.UpgradeException: UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
      at oracle.ias.update.plugin.Plugin.getInitialValue(Plugin.java:317)
      at oracle.ias.update.plan.PlanString.<init>(PlanString.java:67)
      at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
      at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
      at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
      at oracle.ias.update.plan.Template.load(Template.java:161)
      at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
      at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
    Thanks and Regards
    Sunil

    ok - I think I've got it figured.  Appears to be a known issue.  You need to apply patch p17073913_121200.
    I downloaded that and applied to my Linux version - then re-ran the UA.  This time the GUI started and so now I'm going through the upgrade steps.
    The patch is generic, so should work for your windows environment too.  Good luck.

  • Trying to run java class files from my jsp

    I am having difficulty running java files from my jsp. I have compiled my two java classes and inserted them onto my server in the webapps/WEB-INF/classes/scripting directory and have imported scripting.* into my jsp page. The files both compiled ok before the class files were loaded onto the server but when I rty to run the jsp from the server, I keep getting a compiler error. Thanks in advance
    Iob

    Here are the few question
    1) Does your java classes which u created is declared under package scripting. *.class files are to be places under the WEB-INF/classes directory only. Not under scripting. But if you java classes say are under a package called a.b. Then you need to put under classes\a\b\.

  • How can I run a .bat file from an html/javascript adobe air installation package?

    I write an html/javascript code which works completely true
    but when I made the installation package by air-sdk
    it dosent work properly
    my code is:
    <html>
    <head>
        <title>Hello World</title>
              <script type="text/javascript">
            function appLoad() {
                air.trace("Hello World");
        </script>
    </head>
    <body onLoad="appLoad()">
        <h1>Hello World</h1>
              <br />
    <button onclick="window.open('file:///C:/Windows/notepad.exe')"> Launch notepad </button>
    <button onclick="window.open('file:///D:/opennotepad.bat')"> Launch batnote </button>
    </body>
    </html>
    Chapter 5: Creating your first HTML-based AIR application with the AIR SDK

    Seems to be security violation. You can't execute bat or cmd

  • Running .bat files from java applications

    Has anyone tried to run a .bat file from a java application?
    I know I can run java commands by getting the application's runtime, but I've a number of *.bat files I like to run from the application without having to extract the commands from the .bat files.
    thks,

    Crikey! You were answered very shortly after you posted your question, and you STILL haven't bothered to come back. And are you going to create a new userid the next time you ask a question, since bat2004 seems tied to this particular question?

  • Running bat-files from Java

    Hello,
    I have been trying to launch a bat-file from my Java code, running under windows, but with no success.
    Here is my simple code:
    Runtime.getRuntime().exec(new String[] {
             "C:\\temp\\test.bat"
          });This does nothing at all and generates no exception. Any suggestions?

    It seems java has a real problem with this... if you
    want to run another java program, for instance, you
    cannot do that either with String cmd="cmd.exe /C
    java myProgram"
    I need to pass parameters from one program into the
    program I'm going to open using java, that is why I
    need to call it from my first program. It can open
    executables and shortcuts, but has a real big problem
    doing things with the command line.No it doesn't have a problem with it. You just must be doing something wrong. By the way, since "java(.exe)" is already an executable, there's little value in wrapping that by the "cmd.exe" shell (unless you want to use the command shell for some reason such as passing the redirector (>) symbols to it to let it redirect stdout / stderr to a file)

  • Run a batch file from demantra workflow

    I am trying to run a batch file from demantra's workflow by creating an executable step.
    I am getting the following error.
    Error description ’’Invalid command line:’’"D:\Oracle Demantra Spectrum\Collaborator\demantra\sop\populate_staging.bat"
    I am giving the following value in command line of executable step.
    "#application_root#\sop\populate_staging.bat"
    The batch file exists in the appropriate folder.
    Following code is in the batch file.
    sqlldr userid=msdem/msdem@demsbx control=load_item_hier.ctl
    Please help me.
    Thanks

    This should work for you-
    Create a batch file on your current server (ODI) and write in the path to the other batch file on the other server.
    //Server2completename/D$/Path/yourbatchfile.bat
    From ODI call your batch file that you created on the same machine.. which will inturn call the other batch file on a different machine to execute batch client.
    Also can you paste the errors that you may be getting.. need to check if you are getting any specific issue related to this.
    Thanks
    Denzz

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • Running a jar file from java code

    Hi!
    Im trying to run a jar file from my code.
    I've tried Classloader, but that doesnt work because it doesnt find the images (also embedded in the 2nd jar file).
    WHat I would like to do is actually RUN the 2nd jar file from the first jar file. There must be a way to do this right?
    any ideas?

    ok, I found some wonderful code (see below) that will try to start the jar. But it doesn't. What it does is produce the following error when my application runs...
    So it's not finding the images in the jar file that I am trying to run? Strange. I checked the URL that sending, but it seems ok....
    I think I will check the url again to make sure......
    any ideas?
    Uncaught error fetching image:
    java.lang.NullPointerException
         at sun.awt.image.URLImageSource.getConnection(Unknown Source)
         at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
         at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
         at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
         at sun.awt.image.ImageFetcher.run(Unknown Source)
    the code....
    /* From http://java.sun.com/docs/books/tutorial/index.html */
    import java.io.IOException;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.lang.reflect.Modifier;
    import java.net.JarURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.jar.Attributes;
    * Runs a jar application from any url. Usage is 'java JarRunner url [args..]'
    * where url is the url of the jar file and args is optional arguments to be
    * passed to the application's main method.
    public class JarRunner {
      public static void main(String[] args) {
        URL url = null;
        try {
          url = new URL(args[0]);//"VideoTagger.jar");
        } catch (MalformedURLException e) {
          System.out.println("Invalid URL: ");
        // Create the class loader for the application jar file
        JarClassLoader cl = new JarClassLoader(url);
        // Get the application's main class name
        String name = null;
        try {
          name = cl.getMainClassName();
        } catch (IOException e) {
          System.err.println("I/O error while loading JAR file:");
          e.printStackTrace();
          System.exit(1);
        if (name == null) {
          fatal("Specified jar file does not contain a 'Main-Class'"
              + " manifest attribute");
        // Get arguments for the application
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        // Invoke application's main class
        try {
          cl.invokeClass(name, newArgs);
        } catch (ClassNotFoundException e) {
          fatal("Class not found: " + name);
        } catch (NoSuchMethodException e) {
          fatal("Class does not define a 'main' method: " + name);
        } catch (InvocationTargetException e) {
          e.getTargetException().printStackTrace();
          System.exit(1);
      private static void fatal(String s) {
        System.err.println(s);
        System.exit(1);
    * A class loader for loading jar files, both local and remote.
    class JarClassLoader extends URLClassLoader {
      private URL url;
       * Creates a new JarClassLoader for the specified url.
       * @param url
       *            the url of the jar file
      public JarClassLoader(URL url) {
        super(new URL[] { url });
        this.url = url;
       * Returns the name of the jar file main class, or null if no "Main-Class"
       * manifest attributes was defined.
      public String getMainClassName() throws IOException {
        URL u = new URL("jar", "", url + "!/");
        JarURLConnection uc = (JarURLConnection) u.openConnection();
        Attributes attr = uc.getMainAttributes();
        return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;
       * Invokes the application in this jar file given the name of the main class
       * and an array of arguments. The class must define a static method "main"
       * which takes an array of String arguemtns and is of return type "void".
       * @param name
       *            the name of the main class
       * @param args
       *            the arguments for the application
       * @exception ClassNotFoundException
       *                if the specified class could not be found
       * @exception NoSuchMethodException
       *                if the specified class does not contain a "main" method
       * @exception InvocationTargetException
       *                if the application raised an exception
      public void invokeClass(String name, String[] args)
          throws ClassNotFoundException, NoSuchMethodException,
          InvocationTargetException {
        Class c = loadClass(name);
        Method m = c.getMethod("main", new Class[] { args.getClass() });
        m.setAccessible(true);
        int mods = m.getModifiers();
        if (m.getReturnType() != void.class || !Modifier.isStatic(mods)
            || !Modifier.isPublic(mods)) {
          throw new NoSuchMethodException("main");
        try {
          m.invoke(null, new Object[] { args });
        } catch (IllegalAccessException e) {
          // This should not happen, as we have disabled access checks
    }

  • Run tricky bat files

    I am trying to run a bat file which also runs a ksh script;The bat file is a bit tricky because it contains the following:
    set PATH=%CYGWIN_PATH_AGL%\bin;%PATH%
    %NUTC_PATH_AGL%\sh -c a.ksh %1 %2 %3 %4 %5 %6 %7 %8 %9
    These lines call Nutcracker, which is a UNIX-simulator on WindowsXP;
    When I double-click the bat file,it runs ok...but:when i try to call it with:
    try
    Runtime runtime = Runtime.getRuntime();
    String[] cmd =
    {"D:/Documents and Settings/stud6/jbproject/untitled3/a.bat"};
    Process p =runtime.exec(cmd);
    catch(Exception ex)
    ex.printStackTrace();
    ...it does absolutely nothing!
    Running an usual bat file also works fine;
    Please help me!Thanks in advance!

    ...it does absolutely nothing!It does something, just not what you thought it would. It probably aborts with a "bad command or filename", since you need the command shell to run a batch file.

  • Running bat files from JDeveloper

    hi
    Sometimes it could be convenient to run a bat file directly from JDeveloper.
    For example, the application in SQLAuthenticatorApp-v0.02.zip (see also forum thread "how to disable (or lock) users") has an Ant file BuildStuff/build-wlst.xml which has targets like "wlst.create-domain" and "create.wls-start-stop-bat-files", the last one resulting in some bat files which I have been able to configure to run from JDeveloper,
    see http://www.consideringred.com/files/oracle/img/2011/run-using-cmd-20110529.png
    The External Tool cmd configuration I use is shown in the screenshot
    at http://www.consideringred.com/files/oracle/img/2011/external-tool-cmd-20110529.png
    See also the blog post by John 'JB' Brock
    at http://blogs.oracle.com/jdevextensions/entry/how_to_extend_jdeveloper_without_writing_code
    - (q1) How can I configure the External Tool cmd to run in its own cmd (command) window outside JDeveloper?
    many thanks
    Jan Vervecken

    Hi Jan,
    It looks like this is going to be a bug from what I can see. After looking at it a little more this morning, not only does it not display the cmd window, but if you use the /k argument, it leaves the script running in memory. Look at your Task Manager after running a few times with /k
    I'll file a bug, and see if anyone has a work around or something that I missed.
    For now, it would appear this is not possible, and you will just have to see the result in the log window. I would not use /k as well. Stick with /c for now.
    Sorry for the inconvenience.
    --jb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Running .bat files from java code

    Dear Forum,
    I have seen numerous postings on the web about this question, still I have found no answer that works (for me)
    I�m trying to run a simple .bat file from a piece of java code , however it does not work. No error message , but still.
    Does anyone have a tip?
    best regards
    temuj
    try{
                String cmd = "cmd.exe C:\\mybat.bat";
                Runtime.getRuntime().exec(cmd);
    catch(IOException e){System.out.println("ERROR: "+e);}Message was edited by:
    temujin

    "cmd.exe C:\mybat.bat" is being passed to the OS for execution
    what happens when in a terminal/dos window you execute letter for letter:
    cmd.exe C:\mybat.bat
    The output will be identical to what is happening when java makes this call.

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • Running Unit Test from test manager that run bat file from command line

    Hi ,
    I am trying to run Jsystem (java framewotk) from command line using runScenario.bat thru unit test that i associated to test in test manager.
    the idea is that when i ran the automated test  from MTM - it will run the the unit test that will run the appropriate test case in java.
    i wrote the code like this : 
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    namespace UnitTestProject3
    [TestClass]
    public class UnitTest1
    [TestMethod]
    public void TestMethod1()
    try
    String command = "c:\\JSYSTEM\\runner\\runScenario.bat
    c:\\Users\\ryeshua\\Source\\Workspaces\\Auto1\\my-tests-project\\target\\classes scenarios\\feature1 RoeySetup.xml ";
    System.Diagnostics.ProcessStartInfo procStartInfo =
    new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
    procStartInfo.RedirectStandardOutput = true;
    procStartInfo.UseShellExecute = false;
    //procStartInfo.CreateNoWindow = true;
    System.Diagnostics.Process proc = new System.Diagnostics.Process();
    proc.StartInfo = procStartInfo;
    proc.Start();
    string result = proc.StandardOutput.ReadToEnd();
    Console.WriteLine(result);
    catch (Exception objException)
    // Log the exception
    and when i ran it from visual studio it worked perfect. and update  the Jsystem logs of the junit test in the jsystem/runner/log folder.
    but when i added it to associated test and ran it from MTM - it pass but it does not update  the logs in jsystem folder.
    the problem that i dont know what is not working. i cant see the output of it when i ran from mtm but can see when i ran from VS.
    i am using VS 2013 Pro with MTM 2013.
    please advice
    Roey

    Hi Roey,
    Thank you for posting in MSDN forum.
    Based on your issue, could you please tell me how you generate the log file under the jsystem folder?
    Generally, I know that when we run unit test from VS IDE, the file will be saved into the local machine. But when we run unit test from MTM, the unit test method will be run on the test agent machine, so the file will be saved into the test agent machine.
    Therefore, I suggest you could check if you did not see the updated logs file in jsystem folder on the test agent machine.
    In addition, I suggest you could try to copy this unit test project on this test agent machine and then run the unit test method using mstest.exe in command line and then check if you can update the logs file.
    https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396
    If you have any updated message about this issue, please tell me.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • In Mail where can i find my sent emails? How do I open this send box?

    In Mail how do I open the send box? I need to find and forward my sent emails.

  • Typical Requirement in File Adapter

    Hi All,           My scenario is File to Proxy. Now scenario to pick up the File (at sender) is like this: There is a file pick up from FTP Server daily. We will have two files on FTP server.First file is a blank file , which we call a FLAG File. Sec

  • Almost invisible JTable column headers

    I'm writing an applet which contains a JTable within a JScrollPane. For a while the column headings (text) were visible, but recently the column headings have become very small in height. There is barely enough there so that the mouse can be used to

  • Which 7200 rpm 750GB H.D.D. brand is better?????

    Hi guys, I am seriously trying to find the best choice 7200 rpm 750GB H.D.D. for my MBP! Each brand I choose I see lots of complaints.  I talked to a support personnel of one of the resellers and he seriously rejected the new WD.  I, originally, was

  • Print Page in OAF

    Hi, I have implemented a search region in the custom page. When i search based on a date, it displays the records of the employees based on the dates. Now, here is what i need to accomplish. If there are around 10,000 records being displayed and each