Can we run the batch file using simple java application

Hello sir,
we want to run the batch file using simple java application. i tried with some example, we run the exe files but not batch file.
Runtime r = Runtime.getRuntime();
r.exec("D:\\jboss\\bin\\run.bat");
My application is server will run when we run the java appliation.
any suggestion? plz give me the solutions

yes you can run html file
WEB.SHOW_DOCUMENT is a built-in that is used in Forms to call URL from a Web Form. It works much like the similar way that a link on an HTML page works and it takes two arguments, one is URL and second one is TARGET, in your case use following.
WEB.SHOW_DOCUMENT('http://channas.iil.informatics.lk:8890/forms/frmservlet?config=abc.html', '_blank');
Hope this will work for you
Abbas

Similar Messages

  • Running the Batch Processor from a Java application (on schedule)

    Hello,
    I would like to run the Batch Processor (on schedule) from a Java application -- not from the Command Prompt.
    To achieve that, I suppose I would need to call a certain function contained in engine/determinations-batch.jar, using perhaps the path to the config xml as an argument.
    The trouble is that the OPA developer's guide doesn't mention it (or at least I didn't find it).
    Could you help me out?
    Thanks in advance.
    Razvan

    RazvanSaftescu wrote:
    Thanks Frank, but is there a way to identify this method and its syntax? I didn't find anything so far on the internet or on the dev's guide.
    This is the Java main method for the determination-batch.jar file - so the main method has the syntax:
    public static void main(String[] args)
    args is an array of strings matching the command line arguments described in the OPA Developer's Guide topic "Configure the Batch Processor".
    Regards,
    Brad

  • How to run a batch file using tigger....

    Hi, i am trying run a batch file using a trigger on a table.
    say i have a table XYZ(col_1 varchar2 primary key, col_2 varchar2)
    the values of col_2 keeps changing and col_1 are constant
    whenever the value of col_2 in any row changes from "on" to "off" i want to run a batch file C:\Users\ABC\Desktop\test.bat
    i did some searching but couldn't find any solution. Thanks in advance
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    sorry wrong foum to post.
    will post in the correct one
    how to run batch file using trigger?

    Hallo,
    welcome to the forum.
    This is the forum for the tool {forum:id=260}. Your question should be placed in {forum:id=75} or {forum:id=61}.
    When you post your question there please provide additional information like db version, what kind of trigger you want to use, how you want to prevent the execution when the transaction is rolled back... {message:id=9360002}
    Regards
    Marcus

  • How to run the batch files

    Hi Experts,
    I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
    Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
    Thanks,

    There is task type as command in workflow manager if you want you can go for that during the load
    nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
    Check these urls
    http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
    http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html

  • Can not run the test form using servlet (patch 8)

    Installed 9I AS 1.0.2.2.1 and forms patch 8 on Windows 2000.
    Configured the Forms Listener Servlet by following the white paper "Forms 6i Patch 8: Oracle Forms Listener Servlet for Deployment of Forms on the Internet".
    I can get the page titled Forms 6i Listener Servlet using URL: http://myserver/servlet/oracle.forms.servlet.ListenerServlet.
    However, I can not run the test form using the servlet by the url:
    http://myserver/servlet/f60servlet?config=servlet. In the formsweb.cfg file I also added a section
    [servlet]
    serverURL=/servlet/oracle.forms/servlet.ListenerServlet
    No meaningful error message. At first it seems very slow, and then shows the "The page can not be displayed" page.
    Please advise.
    Thanks.

    u must add "Script Alias ifcgi60 "$ORACLE_HOME/forms60/cgi" in confirguration.

  • Running a batch file in a java servlets programme

    this is what i have
    Process p = Runtime.getRuntime().exec("C:\\sync.bat");
    Now i need a way for the program to wait until this is finished running. I dont want to print anything until this is done. Is there a way to do this

    Will this even run sync.bat or do i have to do more.Here is my entire code
    import java.io.*;
    import java.io.File;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.swing.*;
    public class index_test extends HttpServlet
         public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              res.setContentType("text/html");
              PrintWriter out = res.getWriter();
              out.println("<HTML>");
              out.println("<body>");
              try
                   Process p = Runtime.getRuntime().exec("C:\\sync.bat");
                   String dir = "C:\\Perforce";
                   File what = new File(dir);
                   String [] listy = new String [100];
                   String [] products = new String[5];
                   String lists;
                   listy = what.list();
                   out.println("<form action =getBuilds Method = get>");
                   out.println("Please select which Product you wish to search in: ");
                   out.println("<br>");
                   int j = 0;
                   if(listy[j] != null)
                        products[j] = listy[j];
                        j++;
                   int i =0;
                   for(i = 0; i<listy.length && listy[i] !=null;i++)
                        out.println("<input type ='radio' name = 'product' value='"+dir+"\\"+products[i]+"\\build'>");
                        out.println(products);               
                        out.println("<br>");
                   out.println("<input type ='submit' value ='Submit'>");
                   out.println("<br>");
              catch(IOException e){}
              out.println("<img src='C:\\tomcat4\\webapps\\Tracker\\dancing2.gif'>");
              out.println("</form></body></html>");
    What i need is to run sync.bat, wait till its finished then print out the folders in the Perforce directory. I can print out the contents of Perforce grand i just dont know how to run the batch file and get the progeam to wwait until its finished

  • Running a Batch File using Auto Scheduler in HFM?

    Hi,
    Can we execute a batch file or run a macro or execute a VB script using the auto scheduler in Task Automation in HFM??
    Abhishek
    Edited by: user10378700 on Sep 30, 2008 7:18 AM

    I'm having difficulty running a batch script the way you describe.
    One line of code in c:\test.bat:
    echo Hello >c:\test.log
    This works just fine.
    However, for the life of me I cannot get this to work through Task Automation.
    I have the Application as Hub.
    The Action as Execute.
    The Command as c:\test.bat.
    When I select the task and click on Run Now, I get a message that the taskflow has initiated successfully. However, nothing fires on the server. I cannot see this process in Running Tasks (it would run quickly).
    Any hints?
    I have not found this subject to be...overdocumented.
    Regards,
    Cameron Lackpour

  • Running a Batch file Using Java

    hi All ,
    I am executing a DOS batch file using the Java .
    I am using it as
    Process P;
    Runtime rt = Runtime.getRuntime();
    P = rt.exec("C:\\X12TST\\BATCH1.BAT ");
    But in case BATCH1.bat have call to some other Batch File Say Bactch2.bat , i am not getting the output of BATCH2.BAT .
    My Java Program exits as soon as it enters to the point where BATCH1 is calling BATCH2 using (call BATCH2.bat).
    Any help is resolving the problem is highlt appreciated .
    Please advise me if you have any alternative to solve the problem .
    Thanx in advace

    The Runtime.exec() should'nt be used with a .bat or .cmd file since .bat and .cmd are not really executable. I think the expected behaviour you experimentred is a process hang at the last command line of the .bat file.
    Insert "echo XXX" or "net send mycomputer XXX" debug messages in your .bat, you'll see the .bat executes until last line. But the last one NEVER terminates, resulting in a hang in the Java thread doing a process.waitFor().
    The only workaround (or right use of exec) is to call the cmd.exe (with FULL PATH OF cmd.exe SPECIFIED in the exec() call). An exec() calling C:\WINNT\System32\cmd.exe /C mybatch.bat should return properly, cause cmd.exe is a standard Win32 program that will be launched to interpret mybatch.bat then terminate.
    PLEASE UNIX/LINUX USERS : report if the behaviour you get is the same on your plat-form, or if it is -one more- bug in win32 OS. Can you exec() a shell script direcly or do you have to exec() a "bash" or "ksh" or "csh" with you shell script as command line argument ?

  • Getting error while running the XML file using XML Publisher Desktop

    Hi all,
    We have successfully loaded the XML file using XML Publisher Desktop. But when we preview the same using PDF format we are getting the following error.
    Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: C:\Documents and Settings\smanmadh\Desktop\ProductCompensationDT.xml
    FOProcessor setLocale: en-us
    java.lang.NullPointerException
         at oracle.apps.xdo.template.fo.area.PageNumber.formatString(PageNumber.java:104)
         at oracle.apps.xdo.template.fo.IDManager.registerId(IDManager.java:44)
         at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageJoinSeq(AreaTree.java:1106)
         at oracle.apps.xdo.template.fo.area.AreaTree.incrementJoinSequenceIndex(AreaTree.java:219)
         at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageDocument(AreaTree.java:1089)
         at oracle.apps.xdo.template.fo.area.AreaTree.forceOutput(AreaTree.java:471)
         at oracle.apps.xdo.template.fo.elements.FORoot.end(FORoot.java:58)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:386)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:279)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1022)
         at RTF2PDF.runRTFto(RTF2PDF.java:626)
         at RTF2PDF.runXDO(RTF2PDF.java:460)
         at RTF2PDF.main(RTF2PDF.java:251)
    Thanks in Advance.
    Sudeep.

    This is BI related. You will get a quicker answer from the BI Publisher forum
    BI Publisher

  • Error while running the XML file using XML Publisher Desktop

    Hi All,
    We have successfully loaded the XML file using XML Publisher Desktop.But when we try to preview it using the PDF format we are getting the following error.
    Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: C:\Documents and Settings\smanmadh\Desktop\ProductCompensationDT.xml
    FOProcessor setLocale: en-us
    java.lang.NullPointerException
         at oracle.apps.xdo.template.fo.area.PageNumber.formatString(PageNumber.java:104)
         at oracle.apps.xdo.template.fo.IDManager.registerId(IDManager.java:44)
         at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageJoinSeq(AreaTree.java:1106)
         at oracle.apps.xdo.template.fo.area.AreaTree.incrementJoinSequenceIndex(AreaTree.java:219)
         at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageDocument(AreaTree.java:1089)
         at oracle.apps.xdo.template.fo.area.AreaTree.forceOutput(AreaTree.java:471)
         at oracle.apps.xdo.template.fo.elements.FORoot.end(FORoot.java:58)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:386)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:279)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1022)
         at RTF2PDF.runRTFto(RTF2PDF.java:626)
         at RTF2PDF.runXDO(RTF2PDF.java:460)
         at RTF2PDF.main(RTF2PDF.java:251)
    Any pointers will be of great help.
    Thanks in Advance
    Sudeep.


    I had a similar error which when I searched, came up with this thread.
    My issue was resolved after I discovered that my RTF template was not really RTF. It was sill in MS Word DOC format. This was discovered by reviewing two templates in NOTEPAD. The MS-DOC files have a lot of "special" characters in them. My RTF was not really RTF.
    After doing a SAVE AS - RTF format, then the preview worked as expected.
    Just Sharing...
    --Tim                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to run a batch file using java

    Hi guys,
    I want to run a batch file by running a java program.
    i have tried for this code, but it is not working , plz guide me code.
    Runtime r = Runtime.getRuntime();
         Process p = null;
         try
              String[] cmd ={"cmd","/c","C:\\jarkarta-tomcat-3.2.3\\webapps\\DDS\\Resumes\\leap.bat"};
              p = r.exec(cmd);
         catch(Exception e)
         System.out.println("Exception in Runtime batch processing."+e);
         }

    You will need this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How can I execute a batch file from my java program

    Hi,
    Can someone help me or direct me to a link,
    How can I execute a DOS batch file from my java program?
    Thanks

    You will need to grab a handle to the process's
    outputstream so u can see its output.The OP didn't mention any output from any batch file;
    nor any input for that
    matter,so lets not complicate matters here for now
    ok?Actually I think this is essential to see whether it works or not. It's either that or do some manual check to see whether it ran, which is not exactly elegant, and in some cases this may not be easier than simply writing the output stream code, or in fact it may be impossible to check manually.
    I'm sure it wasn't intentional that your post appeared to be bristling with attitude.

  • How can i rename a jar file using only java code

    i have tried everything i can think of to accomplish this but nothing works.

    ghostbust555 wrote:
    In case you geniuses haven't realized I said I tried everything I can think of not that I tried everything. So help or shut up I realize that I didn't try everything but if you can't figure it out either DO NOT POST.
    And the question is how can i rename a jar file using java code? As it says in the title. Read.I would tell you to use the File.renameTo method, but surely that would have been obvious, and you would have tried it already? But maybe you didn't. You were kind of lacking in details in what you tried.
    And yes, I am a genius. Just don't confuse "genius" with "mind-reader".

  • How to exit batch file after launching java application

    hello, I have created a simple java application and a batch file to launch the application. but when execute the batch file the application execute but the batch file still
    appear. I want to launch the application and immediately close the batch file after the application appears.
    Best Regards,
    Boulebtina

    In the batch script use the "START" command to start the program. To use it you need to have the script browse to the application directory first as shown below:
    c:
    cd MyApplication\ApplicationFolder
    START myApp.exe
    exitThis will start an application that is stored in C:\MyApplication\ApplicationFolder\myApp.exe. I use this quite a bit and works well for me.

  • Batch file to start java application

    Hi All,
    I have created a batch file to start my application.
    startApp.bat
    javaw myclass
    But now the problem is the command prompt is not closing. I want the command prompt to close automatically. Any help??
    Thanks in Advance,
    Manjinder Singh

    I cannot use double click on JAR file as i have some other commands also inside batch file. Like classpath setting etc.
    I tried to use cmd /c myapp inside batch file, but still the command prompts stays there till i exit my application.
    Any further HELP??

Maybe you are looking for