Unable to run curl command from process c#

Below is the curl command i am trying to run from c# script and i failed to execute please help
curl -K config.cfg
http://10.10.10.10:8080/MyApp/task
string curlDirectory = "E:\\application";
string curlArg1 = " -K ";
string curlArg2 = "config.cfg";
string curlArg3 = " http://10.10.10.10:8080/MyApp/task";
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
StreamWriter sw = process.StandardInput;
sw.WriteLine("cd " + curlDirectory);
sw.WriteLine("curl " + curlArg1 + curlArg2 + curlArg3);
sw.WriteLine("exit");
sw.Close();
C:>cd E:\application\
E:\application>curl -K config.cfg
http://10.10.10.10:8080/MyApp/task
E:\application>exit

Did you get any error? can you remove the below line and try:
process.StartInfo.CreateNoWindow = true;
Fouad Roumieh

Similar Messages

  • Running curl command from a java program using Runtime.getRuntime.exec

    for some reason my curl command does not run when I run it from within my java program and errors out with "https protocol not supported". This same curl command however runs fine from any directory on my red hat linux system.
    To debug the problem, I printed my curl command from the java program before calling Runtime.getRuntime.exec command and then used this o/p to run from the command line and it runs fine.
    I am not using libcurl or anything else, I am running a simple curl command as a command line utility from inside a Java program.
    Any ideas on why this might be happening?

    thanks a lot for your response. The reason why I am using curl is because I need to use certificates and keys to gain access to the internal server. So I use curl "<url> --cert <path to the certificate>" --key "<path to the key>". If you don't mid could you please tell me which version of curl you are using.
    I am using 7.15 in my system.
    Below is the code which errors out.
    public int execCurlCmd(String command)
              String s = null;
              try {
                  // run the Unix "ps -ef" command
                     Process p = Runtime.getRuntime().exec(command);
                     BufferedReader stdInput = new BufferedReader(new
                          InputStreamReader(p.getInputStream()));
                     BufferedReader stdError = new BufferedReader(new
                          InputStreamReader(p.getErrorStream()));
                     // read the output from the command
                     System.out.println("Here is the standard output of the command:\n");
                     while ((s = stdInput.readLine()) != null) {
                         System.out.println(s);
                     // read any errors from the attempted command
                     System.out.println("Here is the standard error of the command (if any):\n");
                     while ((s = stdError.readLine()) != null) {
                         System.out.println(s);
                     return(0);
                 catch (IOException e) {
                     System.out.println("exception happened - here's what I know: ");
                     e.printStackTrace();
                     return(-1);
         }

  • Running CMD command from process.exec

    I've been chopping this code up so forgive me if this is a mess, however I cannot figure out why this command simply will not work. It never seems to attempt to sign the jar files. I've also tried to sign the jar file by using an output stream. I can run the System.out of the payload from the CMD and it works fine.
    When this method is executed it seems to loop over like nothing is happening.
    private void signJar(String jarPath)
                   String payload = "\"c:\\program files\\java\\jdk1.6.0_17\\bin\\jarsigner.exe\" -keystore \"" + ksPath + "\" -storepass " + ksPW + " \"" + jarPath + "\" " + ksAlias;
                   try {
                        Process proc = Runtime.getRuntime ().exec("cmd /c " + payload);
                        InputStream inputstream = proc.getInputStream();
                        InputStream errorstream = proc.getErrorStream();
                        InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
                        InputStreamReader errorstreamreader = new InputStreamReader(errorstream);
                        BufferedReader inputreader = new BufferedReader(inputstreamreader);
                        BufferedReader errorreader = new BufferedReader(errorstreamreader);
                        while ((line = inputreader.readLine()) != null) {
                             d.asyncExec(new Runnable() {
                                  public void run(){
                        l.setText(line + "\n" + l.getText());
                        while ((line = errorreader.readLine()) != null) {
                             d.asyncExec(new Runnable() {
                                  public void run(){
                             l.setText(line + "\n" + l.getText());
                        errorreader.close();
                        inputreader.close();
                        return;
                        catch(IOException e)
                             e.printStackTrace();
                             return;
              }

    sabre150 wrote:
    You probably have a deadlock since your code falls for at least 2 of the traps described in the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html].
    Thanks, I checked this out and decided to implement one of the methods he had, however, now I am getting an illegal argument exception. I think it is because of my payload, but I am not sure how to fix it. I know everything is formatted properly to input it in the console manually.
    private void signJar(String jarPath)
                   String payload = "\"c:\\program files\\java\\jdk1.6.0_17\\bin\\jarsigner.exe\" -keystore \"" + ksPath + "\" -storepass " + ksPW + " \"" + jarPath + "\" " + ksAlias;
                   String cmds[] = {"cmd","/c",payload};
                   if (cmds.length < 1)
                     System.out.println("USAGE: java GoodWindowsExec <cmd>");
                     System.exit(1);
                 try
                     String[] cmd = new String[3];
                         cmd[0] = "cmd.exe" ;
                         cmd[1] = "/C" ;
                         cmd[2] = cmds[2];
                     Runtime rt = Runtime.getRuntime();
                     System.out.println("Execing " + cmd[0] + " " + cmd[1]
                                        + " " + cmd[2]);
                     Process proc = rt.exec(cmd);
                     // any error message?
                     StreamGobbler errorGobbler = new
                         StreamGobbler(proc.getErrorStream(), "ERROR");           
                     // any output?
                     StreamGobbler outputGobbler = new
                         StreamGobbler(proc.getInputStream(), "OUTPUT");
                     // kick them off
                     errorGobbler.start();
                     outputGobbler.start();
                     // any error???
                     int exitVal = proc.waitFor();
                     System.out.println("ExitValue: " + exitVal);       
                 } catch (Throwable t)
                     t.printStackTrace();
              }Updated with different code still same error
    EDIT: I should pay closer attention and stop trying to copy and paste code. I see where he says you can't use it like the command line...

  • Running Unix Command from WEB-APPLICATION

    Hi all,
    I want to run unix command from a java-based web application. the basic code part is this ---
    public class RunCommand
          public String runIt()
              String s = null, returnString = "";
              Process p=null;
              try
                       Runtime rt = Runtime.getRuntime();
                  p = rt.exec("sh testPOC.ksh");
                  p.waitFor();
                  BufferedReader stdInput = new BufferedReader(new
                       InputStreamReader(p.getInputStream()));
                  BufferedReader stdError = new BufferedReader(new
                       InputStreamReader(p.getErrorStream()));
                  // read the output from the command
                  returnString += "Here is the standard output of the command:<br>";
                  while ((s = stdInput.readLine()) != null) {
                      returnString += s;
                  // read any errors from the attempted command
                  returnString += "Here is the standard error of the command (if any): <br>";
                  while ((s = stdError.readLine()) != null) {
                      returnString += s;
              catch (IOException e)
                  returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              catch(Exception e)
                returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              return returnString;
      }this class is kept as an inner class. The control comes to its outer class, from servlet, from which the runit() is called. but the exception is occuring at line of p=rt.exec(.....). it tells "<command name> : not found transaction completed" [got this using getMessage() method].
    i am unable to show(and see, too) the stacktrace, because i don't have access to that test environment and its log. i can't run this in local because its windows one.
    now can anyone tell me, where is the problem. is there any limitation in web application server/container? this was successful when i used command prompt writing a .java file. Please help me. Thanks in advance...

    Friends, i've got, where the problem is.
    when we run a class file directly from a command prompt, we get an environment with that shell window. but for a servlet application running these kind of commands from a class creates kind of child processes. each and every command is executed as a child process of jvm and don't get those environment. we have 'PATH' variable in the environment. when a command (say, 'dir' or 'sh' or 'ls', etc.) is executed, the shell first search for that executable file (i.e. dir / sh / ls) in the given paths in the variable 'PATH'. this is not available for the child commands of jvm. hence the basic commands are searched in the current directory of the jvm and they are failed.
    i solved the problem giving full path of the commands. like :
    p = rt.exec("/bin/sh runningScript.ksh")

  • 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.......

  • Running ls command from Java stroed procedure no output

    Hi ,
    I am trying to run ls command from java stored procedure in oracle
    Process p = Runtime.getRuntime().exec("ls");
    BufferedReader stdInput = new BufferedReader(new
    InputStreamReader(p.getInputStream()));
    BufferedReader stdError = new BufferedReader(new
    InputStreamReader(p.getErrorStream()));
    // read the output from the command
    System.out.println("output of the command run:\n");
    while ((s = stdInput.readLine()) != null) {
    System.out.println(s);
    from java stored procedure in oracle.
    i get output of println statments but it does not go into while loop to print from stdInput.
    Result of running Java stored procedure is -
    output of the command run:
    Call completed.
    when i run the program on client side it works fine.
    Has anybody tried this from java stroed procedure.
    Thanks,
    Jag

    Jag,
    Actually, the question of whether it works for me seems to depend on the version of the OS (or Oracle). On RedHat Linux (Oracle 8.1.6) it didn't work at all, but on Solaris (Oracle 9.0.2) it did. Here's the output from that run:
    SQL> /
    output of the command run:
    init.ora
    initDBPart9i.DBPSun01.ora
    initdw.ora
    lkDBPART9I
    orapw
    orapwDBPart9i
    spfileDBPart9i.ora
    Done
    PL/SQL procedure successfully completed.
    But, I did need to change a line of your code to this:
    Process p = Runtime.getRuntime().exec("/usr/bin/ls");
    your original was:
    Process p = Runtime.getRuntime().exec("ls");
    You might consider, if possible, use of some of the Java File classes instead of ls, as this might make things more predictable for you. There were some examples in oramag.com a few months ago, but they were pretty simple (you might not need them).
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Ways to run dir command in Process and get Output

    Hello,
    In one of the control in our web application, User can select any directory from his work area and can get list of directories and content of directories i.e. list of files. As working on file object is really slow so the performance is extremely poor. I am thinking of using Process object and run dir command for any directory selected by user and show the directory listing to user.
    Do you guys think it would be possible

    Its always good to work with IO buffer than low level file api. That should be irrelevant to the question as asked (if not then there might be other problems.)This is no way irrelevant but its a fact. Working with Java File api to traverse the content of the directory is really painful. Because we currently use file api to help user to traverse thru her work area.
    BTW, there are two servers. One running the app and the other have all users work areas. User can traverse the workareas content by using something \\server1\workarea1\user1\folder1 etc... in the app to see the content of any folder.A "server" in this context would be an "application" such as something like tomcat. Your client would then ask the "server" for information.
    In your case you are dealing with another file system via the windows remote file system access. So per my question it is not another "server".A server is what providing service to a client and in our case its a app server with a web app in it. The users use the web app to manage their work area(which is another file server).
    The app server and file server and physically two separate machines.
    So again, I am back to my first question, how can run dir command using Process object and get the buffer.
    Till now, I have done this
    ProcessBuilder pb = new ProcessBuilder("cmd", "dir", "c:/");
            pb.directory( new File("C:/temp")); // Or whatever directory you want for cwd
            Map<String,String> env = pb.environment();
            env.put("PATH", "C:/temp");
            try {
                 Process process = pb.start();
                   InputStream inStream = process.getInputStream();
                   new AsyncPipe(process.getErrorStream(), System.out).start();
                 new AsyncPipe(process.getInputStream(), System.out).start();
                 final int returnCode = process.waitFor();
                 System.out.println("Return code is " + returnCode);
                   System.out.println("\nExit value = " + inStream + "\n");
              } catch (Exception e) {
                   e.printStackTrace();
              }However it simply opens command prompt

  • Error while logging in  `ERR-10740 Unable to run custom post-auth process.'

    Hi there,
    I get the following error only with specific users; some can login, some can't. There is consistency is who receives this error.
    Error      ERR-10740 Unable to run custom post-auth process.
    the text of the "Post-Authentication Process" field in the my authentication schemes is as follows:
    begin
    bare_auth.session_init;
    end;
    The bare_auth package has no errors:
    select object_type, status
    from user_objects
    where object_name = 'BARE_AUTH';
    OBJECT_TYPE STATUS
    PACKAGE VALID
    PACKAGE BODY VALID
    2 rows selected
    The error message isn't very helpful and I can't see why Apex can't run it. Why is Apex unable to run the custom post-auth process?
    Robert

    Thats just the message when you get when there is an unhandled exception in your post-auth process. Apex wraps your code with its own and if you hit any error it just raises that error to the screen. If you were to go into your post-auth and do:
    declare
      v number;
    begin
      v:= 1/0;
    end;You can see that it raises the same error message to the screen instead of an excepted pl/sql exception about dividing by zero.

  • Running ssh command from java and then answering password prompt

    Hi,
    I have a situation that has not solved yet. I am running ssh command from unix terminal without any problem, and then i enter password.
    For example :
    [oracle@fuata]:/export/home/oracle> ssh -N [email protected] -L 9901:127.0.0.1:9999
    Password:
    It is working. I have question that how can i perform this in java? I am thinking that i can run ssh command by using Runtime Class, it is ok. But how can i answer the password? I am a bit confused. Is there any example looks like this?
    Thanks for responses.

    futi wrote:
    Thanx. Firstly i insisted to do this without jsch but actually this is harder than jsch. I edit some of code pieces PortForwardingL.java and could run it. It works problem-free. Could you say why you "insisted" on this approach. It can't be for speed+ since jsch is very fast. It can't be for portability+ since jsch is portable but the use of Runtime.exec() requires the installation of ssh software. It can't be because of limitations+ since jsch is a fully featured library. It can't be for security+ since jsch is secure. It can't be for ease of use+ since jsch is much easier to use than ssh with Runtime.exec(). Unless it's a licensing issue, it can't be for commercial+ reasons since jsch is free. The only reason I can think of why one would "insisted" on this approach is if it is for some college project.

  • Run OS command from Oracle

    Hi All!!
    Which package can help me to run OS command from SQL script?
    Thanks.

    If you are using SQL*Plus to execute the script, you can use the SQL*Plus command HOST. If you are trying to execute an operating system command from a PL/SQL block (i.e. a stored procedure), you would need to use an external procedure or a Java stored procedure that uses Java's shell functionality.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Is it possible to run host command from SAP environment? How do you run?

    Hi
    Is it possible to run host command from SAP environment? How do you run?
    Thank You

    Hello Subhash
    You will more details in the following thread:
    Re: How to define command for SXPG_COMMAND_EXECUTE
    Regards
      Uwe

  • Running sqlldr command from PL/SQL Block

    DECLARE
    BEGIN
    END;

    In SQL * plus we can run DOS commands using the following command
    HOST DIR
    HOST DIR/P
    But When we can't run the HOST command in PL/SQL Block..
    I have to Run sqlldr command from PL/SQL Block..
    i tried as follows
    DECLARE
    BEGIN
    EXECUTE IMMEDIATE ' host sqlldr control= bad= ';
    END;
    By
    BalaNagaRaju

  • How to run OS commands from PL/SQL???

    Hi
    Is there any way to run OS commands(Windows Platform) from within PL/SQL?
    Thanks

    APC,
    I am working on Discoverer, having lots of BAs & Workbooks created & stored in Database. Now if i want to move all the workbooks from one place to another (like from development to test or production) i can use Command line interface of Disco to do this. But i don't see any option there to export all the workbooks, so i thought of writing a pl/sql to get all the workbook names from the EUL then fire export Command for each record(although not a good practice but its a one time work). This is the place where i need to run OS command from within PL/SQL. Although it doesn't seem possible now(as you all said) without external procedure.
    Lastly, you are right that "Oracle make databases not operating systems" but my first impression/comment about oracle is:
    "Oracle is far Bigger, Powerful, Complex, Vast and Interesting System than any other..." so i believe it can do/capable doing anything :-)
    thx Ashutosh,
    Host is definitely an option but i can't run it from pl/sql(that i am looking for)..

  • Unable to run struts project from jdeveloper 10.1.3

    Hi,
    I have created a struts-based application project using jdeveloper 10.1.3(build JDEVADF_10.1.3.1.0_NT..) by importing an ear file .The project seems to be built fine as i get no errors in compiling the entire project.I have included the Struts runtime library as well in the project.
    But when i try to run the login.jsp from the struts-config.xml,i get the :
    The page cannot be displayed message in the browser.
    I dont see any errors in the Embedded OC4J log except few warnings lik dis:
    [Another instance of the server is still running.  JDeveloper will shut it down and then restart the server.]
    Process exited.
    [Starting OC4J using the following ports: HTTP=8898, RMI=23899, JMS=9235.]
    D:\jdevr12\jdevhome\jdev\system\oracle.j2ee.10.1.3.39.81\embedded-oc4j\config>
    D:\jdevr12\jdevbin\jdk\bin\javaw.exe -client -classpath D:\jdevr12\jdevbin\j2ee\home\oc4j.jar;D:\jdevr12\jdevbin\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config D:\jdevr12\jdevhome\jdev\system\oracle.j2ee.10.1.3.39.81\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    25-Jul-2007 18:46:28 com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
    25-Jul-2007 18:46:28 com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
    WARNING: Code-source D:\jdevr12\jdevbin\jdev\appslibrt\xml.jar (from <library> in /D:/jdevr12/jdevhome/jdev/system/oracle.j2ee.10.1.3.39.81/embedded-oc4j/config/application.xml) has the same filename but is not identical to /D:/jdevr12/jdevbin/lib/xml.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\jdevr12\jdevbin\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader default.root:0.0.0.
    WARNING: Code-source D:\jdevr12\jdevbin\jdev\appslibrt\jazn.jar (from <library> in /D:/jdevr12/jdevhome/jdev/system/oracle.j2ee.10.1.3.39.81/embedded-oc4j/config/application.xml) has the same filename but is not identical to /D:/jdevr12/jdevbin/j2ee/home/jazn.jar (from <code-source> in META-INF/boot.xml in D:\jdevr12\jdevbin\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader default.root:0.0.0.
    WARNING: Code-source D:\jdevr12\jdevbin\jdev\appslibrt\jazncore.jar (from manifest of /D:/jdevr12/jdevbin/jdev/appslibrt/jazn.jar) has the same filename but is not identical to /D:/jdevr12/jdevbin/j2ee/home/jazncore.jar (from <code-source> in META-INF/boot.xml in D:\jdevr12\jdevbin\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader default.root:0.0.0.
    WARNING: Code-source D:\jdevr12\jdevhome\jdev\system\oracle.j2ee.10.1.3.39.81\embedded-oc4j\applications\datatags\webapp\WEB-INF\lib\uix2.jar (from WEB-INF/lib/ directory in D:\jdevr12\jdevhome\jdev\system\oracle.j2ee.10.1.3.39.81\embedded-oc4j\applications\datatags\webapp\WEB-INF\lib) has the same filename but is not identical to /D:/jdevr12/jdevbin/jdev/appslibrt/uix2.jar (from <library> in /D:/jdevr12/jdevhome/jdev/system/oracle.j2ee.10.1.3.39.81/embedded-oc4j/config/application.xml). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader datatags.web.webapp:0.0.0.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 26766 ms.
    pls help me out on what could be the problem.This application wsa running fine in Eclipse but i am unable to run it using Jdeveloper.

    Is this new develop page ?
    you check these points for this issue.
    1. Check JDEV_USER_HOME
    2. Design a Test PG and test it first.
    3. Your OAF patch level: is 12.0.4 ? Are you running with r12?
    Thanks

  • Run os command from UDF

    hi I am using this code which needs to copy file
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    public class RunSystemCommand {
         public static void main(String args[]) {
         String s = null;
    //        system command to run
         String cmd = "copy a.txt b.txt";
    //        set the working directory for the OS command processor
         File workDir = new File("c:
    temp");
         try {
         Process p = Runtime.getRuntime().exec(cmd, null, workDir);
         int i = p.waitFor();
         if (i == 0){
         BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
    //        read the output from the command
         while ((s = stdInput.readLine()) != null) {
         System.out.println(s);
         else {
         BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    //        read the output from the command
         while ((s = stdErr.readLine()) != null) {
         System.out.println(s);
         catch (Exception e) {
         System.out.println(e);
    it doesnt work,the error is
    java.io.IOException: CreateProcess: copy a.txt b.txt error=2
    thx,Shai

    If you are using SQL*Plus to execute the script, you can use the SQL*Plus command HOST. If you are trying to execute an operating system command from a PL/SQL block (i.e. a stored procedure), you would need to use an external procedure or a Java stored procedure that uses Java's shell functionality.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • My country is not listed in 1st generation iPod Nano replacement program

    Hello; When I first heard about the replacement program, there were no Apple stores in Turkey. So I couldn't get my replacement. Now we do have an Apple Store in İstanbul. Last week I went there with my 1st gen iPod nano and explained them the issue,

  • WCCP assignment method mismatch

    Hi all, I am using a Cisco 3825 running 12.4(25G) code. I just upgraded my WAE (oe674) to 5.1.1c. The WAE and router wouldnt peer due to assignment method mismatch when i do a show wccp router. Router Information for Service Id: 61         Routers Se

  • 9i client version

    How do I determine which version of the Oracle 9i client is loaded? Can the 9i client be upgraded without removing the current 9i version? Where do I find the latest version?

  • Resizing Windows and Mac volumes

    Would anyone please be able to give me some direction as to how to downsize my windows volume in order to give me more space on the Mac volume? Thanks in advance...

  • Cluster interconnect on LDOM

    Hi, We want to setup Solaris cluster on LDOM environment. We have: - Primary domain - Alternate domain (Service Domain) So we want to setup the cluster interconnect from primary domain and service domain, like below configuration: example: ldm add-vs