Invoke the command unzip from unix in java-code ...

Hi people,
i have problem, i want to use the command unzip from unix, to unzip a zip-file, the commend unzip must invoke from java-code. Can someone help me. I use the zip-api, but i have 100Mb zip-file, it needs very long time to unzip the zip-file.
thanks for your help ...

use Runtime.exec() to call your unix "unzip" command from java, if its much faster.

Similar Messages

  • Using unzip from unix in java-code ...

    Hi people,
    i have problem, i want to use the command unzip from unix, to unzip a zip-file, the commend unzip must invoke from java-code. Can someone help me. I use the zip-api, but i have 100Mb zip-file, it needs very long time to unzip the zip-file.
    thanks for your help ...

    ok, not sure how much improvement this will give in general, but its given a reliable 25% speed increase on my mini tests
    using the nio libraries will also get you a lot further, and is the way to go if you are very keen on speed
    asjf
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import javax.swing.*;
    public class Unzipper {
         private Unzipper() {}
         private static byte[] buffer = new byte[16384];
         public static void unzip(File file, Component parentComponent,     File outputDir) throws ZipException, IOException {
              unzip(new ZipFile(file), parentComponent, outputDir);
         public static void unzip(File file, int mode, Component parentComponent, File outputDir) throws IOException {
              unzip(new ZipFile(file, mode), parentComponent, outputDir);
         public static void unzip(String name, Component parentComponent, File outputDir)     throws IOException {
              unzip(new ZipFile(name), parentComponent, outputDir);
         public static void unzip(ZipFile zip, Component parentComponent, File outputDir)     throws IOException {
              if ( zip == null) {
                   throw new NullPointerException("outputDir is null");
              int size = zip.size();
              if (size > 0) {
                   if (outputDir == null) {
                        throw new NullPointerException("outputDir is null");
                   if (!outputDir.exists()) {
                        outputDir.mkdirs();
                   ProgressMonitor monitor =
                   new ProgressMonitor(parentComponent,
                   "Unpacking " + zip.getName() + "...", "", 0, size);
                   monitor.setMillisToDecideToPopup(0);
                   monitor.setMillisToPopup(0);
                   Enumeration entries = zip.entries();
                   for ( int i = 0; entries.hasMoreElements(); ) {
                        ZipEntry entry = (ZipEntry) entries.nextElement();
                        /*if (entry.getMethod() == ZipEntry.DEFLATED)
                        System.out.println(" Inflating: "+entry.getName());
                        else
                        System.out.println(" Extracting: "+entry.getName());*/
                        monitor.setNote(entry.getName());
                        File File = new File(outputDir, entry.getName());
                        File.getParentFile().mkdirs();
                        if (!entry.isDirectory()) {
                             InputStream in = null;
                             OutputStream out = null;
                             try {
                                  in = zip.getInputStream(entry);
                                  out = new FileOutputStream(File);
                                  for (int n = 0; (n = in.read(buffer)) > -1; )
                                       out.write(buffer, 0, n);
                                  monitor.setProgress(++i);
                             } finally {
                                  if (out != null) {
                                       try {
                                            out.close();
                                       } catch (IOException e) {
         public static void main(String[] args) throws ZipException, IOException
              if (args.length !=2) {
                   System.err.println("Usage: java Unzipper <zip file> <output dir>");
                   System.exit(1);
              long start = -System.currentTimeMillis();
              unzip(args[0], null, new File(args[1]));
              System.out.println(start+System.currentTimeMillis());
              System.exit(0);

  • How to store the data read from excel using java code in Ms access database

    Hi. I wrote a code to read the data from excel. May i know how can i save it to Ms access database using java. Also i have many excels. So i should not connect the database using DSN. So is there any other way to achieve this?

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • How do you invoke the default browser for Unix/OSX

    Does anyone know how to programmatically display the contents of a URL in the default browser for a Unix system? I found a javaworld article on doing this using Runtime.getRuntime().exec(cmd). The article gives the cmd string for invoking the default browser in Windows, and for invoking the Netscape browser in Unix.
    This can easily be extended to invoke any known browser executable in a known path on a Unix system; but I'd like to invoke the default browser without knowing what or where it is. I'm specifically targetting Mac/OSX, but any Unix solution is worth trying.
    Is there a Unix command for launching the default browser to display the contents of a given URL? Or is there an alternative approach, rather than invoking Runtime.exec()?
    -Mark

    After extensive google searching, I came across a partial solution. This code detects the default browser on a Mac, and provides an elegant solution for trying standard browsers in turn for other Unix systems. I tested it on WIndows XP and Mac OSX 3.9, and it detected the default browser each time. A suped up version of this tool is available as a SourceForge project. You can find it here:
    http://sourceforge.net/projects/browserlaunch2/
    Here's the simplified code:
    //  Bare Bones Browser Launch                          //
    //  Version 1.5                                        //
    //  December 10, 2005                                  //
    //  Supports: Mac OS X, GNU/Linux, Unix, Windows XP    //
    //  Example Usage:                                     //
    //     String url = "http://www.centerkey.com/";       //
    //     BareBonesBrowserLaunch.openURL(url);            //
    //  Public Domain Software -- Free to Use as You Like  //
    import java.lang.reflect.Method;
    import javax.swing.JOptionPane;
    public class BareBonesBrowserLaunch {
       private static final String errMsg = "Error attempting to launch web browser";
       public static void openURL(String url) {
          String osName = System.getProperty("os.name");
          try {
             if (osName.startsWith("Mac OS")) {
                Class fileMgr = Class.forName("com.apple.eio.FileManager");
                Method openURL = fileMgr.getDeclaredMethod("openURL",
                   new Class[] {String.class});
                openURL.invoke(null, new Object[] {url});
             else if (osName.startsWith("Windows"))
                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
             else { //assume Unix or Linux
                String[] browsers = {
                   "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" };
                String browser = null;
                for (int count = 0; count < browsers.length && browser == null; count++)
                   if (Runtime.getRuntime().exec(
                         new String[] {"which", browsers[count]}).waitFor() == 0)
                      browser = browsers[count];
                if (browser == null)
                   throw new Exception("Could not find web browser");
                else
                   Runtime.getRuntime().exec(new String[] {browser, url});
          catch (Exception e) {
             JOptionPane.showMessageDialog(null, errMsg + ":\n" + e.getLocalizedMessage());
       }

  • DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Hi,
    I don't know if this works:
    perform SET_TRAIL_BLANKS(saplgrap) using 'X'.  
    perform SET_FIXLEN(saplgrap) using '0' '060'.   "put length of your line from-to
    ... download ...
    It will put space at the end of your line, according to the length.
    Hope it works,
    Chang

  • I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?

    I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?
    i tryed with download mavericks but finally its saying a error message like cant conect to istore like that its saying and every thing is clear like internet and other stuf i tryed with 3times no progress same error pls help.. i bought this lap for my bro with his apple id only we use it now he got a new mac book pro so he gave to me so i formated and use it i use my apple id is that problem come because of changing apple id ? pls eplain

    Firstly, what is the source of the 10.6.4 disc? Is it the original installation disc for your MacBook, or one 'borrowed' from another computer?
    It isn't the retail version, because that's 10.6.3.
    Assuming it's the correct disc (i.e. the one that shipped with your Mac), you need to boot from it again.
    OK the language page.
    From the installer screen, ignore the continue button, go to the menu bar and choose Disk Utility from the Utilities menu.
    In DU, select your internal drive in the sidebar (the top item with the makers name and serial no.).
    Run Repair Disk. If that comes up as disk OK, click the partition tab. Select the partiton from the drop-down above the graphic; 1 partiton is all you need.
    Go to the options button and ensure that the partition scheme is GUID and the file system to Mac OS Extended (Journalled). Name the partiton (usually Macintosh HD), click Apply.
    When the Macintosh HD volume appears below the drive name, quit DU and see if you can then install.
    If the screen after the language screen doesn't show the menu bar, it may be necessary to use another Mac to do the job with the MB in Firewire Target Disc Mode. If it won't boot in TDM, or the MB doesn't have FireWire then it's getting very difficult.

  • How to invoke the command interpreter to run the "NS.exe" using Runtime?

    hi,everyone
    I need to invoke the command interpreter,and enter the disk directory "c:/ns2/bin/",then run the "ns myfilename" command.My program is followed:
    try{
    String s[]=new String[4];
    s[0]="cmd.exe";
    s[1]="/c";
    s[2]="cd c:/ns2/bin";
    s[3]="ns.exe c:/ns2/bin/100n-500k-5.tcl";
    Runtime R=Runtime.getRuntime();
    Process p=R.exec(s);
    int exitVal = p.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    But this doesn't work!
    please help me! thanks!

    hi,everyone
    I need to invoke the command interpreter,and
    and enter the disk directory "c:/ns2/bin/",then run
    the "ns myfilename" command.My program is followed:
    try{
    String s[]=new String[4];
    s[0]="cmd.exe";
    s[1]="/c";
    s[2]="cd c:/ns2/bin";
    s[3]="ns.exe c:/ns2/bin/100n-500k-5.tcl";
    Runtime R=Runtime.getRuntime();
    Process p=R.exec(s);
    int exitVal = p.waitFor();
    System.out.println("Process exitValue: " +
    alue: " + exitVal);
    But this doesn't work!
    please help me! thanks!CDing will not change the directory.
    should write:
    String cmd= "cmd /c c:\\ns2\\bin\\ns.exe c\\ns2\\bin\\100n-500k-5.tcl"
    for further details on how to use Runtime.exec(), see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Invoke the secured webservice from BPEL in Solaris environment

    Hi All,
    Can any one tell me how to invoke the secured webservice from BPEL in Solaris environment as i am able to invoke the secured web service from BPEL in windows platform(soa suite 10.1.3.4).
    we have applied 10.1.3.4 patch on solaris environment but we are not able to invoke the same.
    Thanks in advance
    Regards,
    Nagaraju .D

    Hi Nagaraju,
    Read your post.We've somewhat the similar problem as yours as we are facing some error while invoking a WS-Security secured web service from our BPEL Process on the windows platform(SOA 10.1.3.3.0).
    For the BPEL process we are following the same steps as given in an AMIS blog : - [http://technology.amis.nl/blog/1607/how-to-call-a-ws-security-secured-web-service-from-oracle-bpel]
    but sttill,after deploying it and passing values in it,we are getting the following error on the console :-
    &ldquo;Header [http://schemas.xmlsoap.org/ws/2004/08/addressing:Action] for ultimate recipient is required but not present in the message&rdquo;
    As you have wriiten that you've already called a secured web service in windows platform ,so if you can please help me out in this issue.
    I've opened a separate thread for this to avoid confusion. :-
    Error while invoking a WS-Security secured web service from Oracle BPEL..
    Thanks,
    Saurabh

  • Get parameter from URL in Java code

    Hello everyone,
    I've got strange problem. I have one JSF page with two controls:
    - InputText
    - Button
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="view12.jsf" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:inputText label="Label 1" id="it98" value="#{param.test}" editable="always"/>
    <af:commandButton actionListener="#{bindings.przekierowanie.execute}" text="przekierowanie"
    disabled="#{!bindings.przekierowanie.enabled}" id="cb1"/>
    </af:form>
    </af:document>
    </f:view>
    And I want to initialize the InputText with parameter from URL (param name is test - value="#{param.test}"). In JSF page everything is fine. But after clicking button I have to read the value from InputText in Java Code, so I have URL:
    http://127.0.0.1:7101/Application6-ViewController-context-root/faces/view12.jsf?test=asd
    and my Java code which is executed after clicking button is:
    public String przekierowanie() {
    Map <String,String> map=FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    String tttValue=map.get("test");
    System.err.println("test:" + tttValue);
         return null;
    but this doesn't work... Everytime I get null when I click the button. Could you tell me why and How to obtain this value, from InputTex in my java function?

    Hi,
    If you have a parameter in URL named as "product", you can get its value like:
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpServletRequest;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpServletRequest httpRequest =
    (HttpServletRequest)facesContext.getExternalContext().getRequest();
    String product = httpRequest.getParameter("product");

  • How to send sms to mobile from tomcatserver using java code?

    Hi,
    Could you please let me know that,
    How to send sms to mobile from tomcatserver using java code? Please provide the code snippet.
    Thanks in advance.

    Yes, but something needs to send that message. You can't just take an arbitrary computer and send an SMS, it does not have the hardware to do that.
    So either you have a mobile through which you do that or more likely - you use some sort of online service to do it. Whatever choice you make will determine what code you will have to write to get it done. Nobody is going to deliver the code to you, that's your job. It is also your job to figure out what service you are going to use.

  • Got the following reply from db-kernel: SQL-Code :-903

    Dear Experts,
    I am having a problem running MaxDB Data backup on Netbackup.... Please se log below and suggest.
    2011-04-11 13:30:38
    Using environment variable 'TEMP' with value 'C:\Windows\TEMP' as directory for temporary files and pipes.
    Using connection to Backint for MaxDB Interface.
    2011-04-11 13:30:39
    Checking existence and configuration of Backint for MaxDB.
        Using configuration variable 'BSI_ENV' = 'C:\Netbackup_Script\bsi_backint_daily.env' as path of the configuration file of Backint for MaxDB.
        Setting environment variable 'BSI_ENV' for the path of the configuration file of Backint for MaxDB to configuration value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Reading the Backint for MaxDB configuration file 'C:\Netbackup_Script\bsi_backint_daily.env'.
            Found keyword 'BACKINT' with value 'D:\sapdb\KGP\db\bin\backint.exe'.
            Found keyword 'INPUT' with value 'E:\sapdb\data\wrk\KGP\backint.input'.
            Found keyword 'OUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.output'.
            Found keyword 'ERROROUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.error'.
            Found keyword 'PARAMETERFILE' with value 'C:\Netbackup_Script\backint_parameter_daily.txt'.
        Finished reading of the Backint for MaxDB configuration file.
        Using 'D:\sapdb\KGP\db\bin\backint.exe' as Backint for MaxDB program.
        Using 'E:\sapdb\data\wrk\KGP\backint.input' as input file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.output' as output file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.error' as error output file for Backint for MaxDB.
        Using 'C:\Netbackup_Script\backint_parameter_daily.txt' as parameter file for Backint for MaxDB.
        Using '300' seconds as timeout for Backint for MaxDB in the case of success.
        Using '300' seconds as timeout for Backint for MaxDB in the case of failure.
        Using 'E:\sapdb\data\wrk\KGP\dbm.knl' as backup history of a database to migrate.
        Using 'E:\sapdb\data\wrk\KGP\dbm.ebf' as external backup history of a database to migrate.
        Checking availability of backups using backint's inquire function.
    Check passed successful.
    2011-04-11 13:30:39
    Checking medium.
    Check passed successfully.
    2011-04-11 13:30:39
    Preparing backup.
        The environment variable 'BSI_ENV' has already the value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
        Setting environment variable 'BI_REQUEST' to value 'NEW'.
        Setting environment variable 'BI_BACKUP' to value 'FULL'.
        Constructed Backint for MaxDB call 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c'.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.output' as output for Backint for MaxDB.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.error' as error output for Backint for MaxDB.
        Writing 'D:\sapdb\pipe2 #PIPE' to the input file.
    Prepare passed successfully.
    2011-04-11 13:30:39
    Starting database action for the backup.
        Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    2011-04-11 13:30:39
    Waiting until database has prepared the backup.
        Asking for state of database.
        2011-04-11 13:30:39 Database is still preparing the backup.
        Waiting 1 second ... Done.
        Asking for state of database.
        2011-04-11 13:30:41 Database has finished preparation of the backup.
    The database has prepared the backup successfully.
    2011-04-11 13:30:41
    Starting Backint for MaxDB.
        Starting Backint for MaxDB process 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c >>E:\sapdb\data\wrk\KGP\backint.output 2>>E:\sapdb\data\wrk\KGP\backint.error'.
        Process was started successfully.
    Backint for MaxDB has been started successfully.
    2011-04-11 13:30:41
    Waiting for end of the backup operation.
        2011-04-11 13:30:41 The backup tool is running.
        2011-04-11 13:30:41 The database is working on the request.
        2011-04-11 13:30:43 The database has finished work on the request.
        Receiving a reply from the database kernel.
        Got the following reply from db-kernel:
            SQL-Code              :-903
        2011-04-11 13:30:43 The backup tool is running.
        2011-04-11 13:30:44 The backup tool process has finished work with return code 2.
    The backup operation has ended.
    2011-04-11 13:30:44
    Filling reply buffer.
        Have encountered error -24920:
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
        Constructed the following reply:
            ERR
            -24920,ERR_BACKUPOP: backup operation was unsuccessful
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
    Reply buffer filled.
    2011-04-11 13:30:44
    Cleaning up.
        Copying output of Backint for MaxDB to this file.
    Begin of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
            Reading parameter file C:\Netbackup_Script\backint_parameter_daily.txt.
            Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Using C:\Netbackup_Script\nt_initKGPdaily.utl as parameterfile of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Using E:\sapdb\data\wrk\KGP\backintoracle.in as input of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.out as output of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.err as error output of Backint for Oracle.
            Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Reading input file E:\sapdb\data\wrk\KGP\backint.input.
            Backing up pipe D:\sapdb\pipe2.
            Found 1 entry in the input file.
            Starting the backup.
            Starting pipe2file program(s).
            Waiting for creation of temporary files.
            1 temporary file is available for backup.
            Calling Backint for Oracle at 2011-04-11 13:30:43.
            Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\nt_initKGPdaily.utl -i E:\sapdb\data\wrk\KGP\backintoracle.in -c' .
            Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Reading parameter file C:\Netbackup_Script\nt_initKGPdaily.utl.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.in as input of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.out as output of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.err as error output of Backint for Oracle.
            Backint for Oracle output: Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Backint for Oracle output: Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Backint for Oracle output:
            Backint for Oracle output: Reading input file E:\sapdb\data\wrk\KGP\backintoracle.in.
            Backint for Oracle output: Backing up file D:\sapdb\Stage1.0.
            Backint for Oracle output: Found 1 entry in the input file.
            Backint for Oracle output:
            Backint for Oracle output: Starting the backup.
            Backint for Oracle output: Starting pipe2file program(s).
            Backint for Oracle output:
            Backint for Oracle output: Calling Backint for Oracle at 2011-04-11 13:30:43.
            Backint for Oracle output: Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -i E:\sapdb\data\wrk\KGP\backint4oracle.in -c' .
            Backint for Oracle output: Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Backint for Oracle output: Reading parameter file .
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle error output: No staging area is defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The path of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the history file is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the input file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the error output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output:
            Backint for Oracle output:
            Backint for Oracle output: Finished the backup unsuccessfully.
            Backint for Oracle output:
            Backint for Oracle output: #ERROR D:\sapdb\Stage1.0
            Backint for Oracle output:
            Backint for Oracle error output: Backint for Oracle was unsuccessful.
            Backint for Oracle error output:
            Finished the backup unsuccessfully.
            #ERROR D:\sapdb\pipe2
    End of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
        Removed Backint for MaxDB's temporary output file 'E:\sapdb\data\wrk\KGP\backint.output'.
        Copying error output of Backint for MaxDB to this file.
    Begin of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
            Backint for Oracle was unsuccessful.
    End of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
        Removed Backint for MaxDB's temporary error output file 'E:\sapdb\data\wrk\KGP\backint.error'.
        Removed the Backint for MaxDB input file 'E:\sapdb\data\wrk\KGP\backint.input'.
    Have finished clean up successfully.

    >     Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    This seems to be your problem, the pipe is wrongly defined. On Windows it looks like
    \\.\pipe1
    see
    http://msdn.microsoft.com/en-us/library/aa365783.aspx
    Markus

  • Invoke a command-line from java

    Hello!
    I wonder if there' s a way to invoke a command or running an .exe file from java code.
    10X,
    Yaron

    Sure, using the exec method in the class Runtime. You have to be careful with it though...
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • JNI Problem - JAVA invoke C++ and the way back from C++ to JAVA

    Hi @ all!
    I am a computer science student and I have a problem with the JNI Interface.
    First the program structure:
    We have a Java GUI a wrapper and a C++ protocol. That is the general communication way:
    left side:
    JAVA GUI
    |
    Wrapper (JAVA)
    |
    C++ protocol
    |
    |
    Network transfer
    |
    |
    C++ protocol
    |
    Wrapper (JAVA)
    |
    JAVA Gui
    The program sequence is following:
    - The GUI will be started and call a protocol init method in the native code. The JAVA and C++ instance are already running!!
    - The protocol handles some information.
    - Then the left side e.g. invoke a method. The protocol transmits the packet to the other side. But HERE is the problem. On the other side the protocol must call a static JAVA Method from the running JAVA instance.
    I have no idea how I can handle this problem. I tried to save the env pointer und the jobject at the first invocation from Java to C++. With this elements I tried to getObjectClass(saved jobject) and tried to invoke the static JAVA method but I got a SIGSEGV from the JVM.
    How can I solve this problem??
    By the way, I generate through the java wrapper my C++ header and the the Java wrapper load a shared object!
    I work with a Gentoo System and with Java 1.5.
    I hope anybody can help me!
    Cheers,
    Edited by: polo6n2 on Jul 3, 2008 1:04 AM

    You mean the communication is aschronous?
    Then the C++ side will have a C++ thread. That thread calls a method. That method FIRST uses the JNI method to attache the thread.
    Then you look up whatever you need in java, maybe a class and you call JNI methods to interact with it.
    If you don't attach the thread it will not work.
    JAVA method but I got a SIGSEGVThen you did something wrong in your C++ code.

  • What is the simplest way to invoke the command associated with an existing menu item from a plugin?

    Hey there,
    My specific task is to bring forward the "Swatches" window.  I want to initiate this from my plugin code (C++).  However, I may want to execute other menu items in the future, so understanding the simplest, most straightforward general mechanism would be great.
    I've pieced together a sequence that could work using the Menu and Interface suites, but it seems more complicated than it should be and requires knowledge of the localized name of the menu item (incomplete and uncompiled sample code below).  Is there a better way to do this?
    // Get the menu item handle by walking all items to find the swatches item
    long numMenuItems = 0;
    sAIMenu->CountMenuItems( &numMenuItems );
    AIMenuItemHandle menuItemHandle;
    ai::UnicodeString localizedItemName;
    for ( long menuItemIndex = 0; menuItemIndex < numMenuItems; ++menuItemIndex )
        sAIMenu->GetNthMenuItem( menuItemIndex, &menuItemHandle );
        sAIMenu->GetItemText( menuItemHandle, localizedItemName );
        if ( localizedItemName == “Swatches” )
            break;
    AIBoolean bchecked =false;
    sAIMenu->IsItemChecked( menuItemHandle,
                            &bchecked );
    if ( !bchecked )
       // Find the plugin responsible for adding and responding to the menu item
        SPPluginRef swatchPlugin;
        sAIMenu->GetMenuItemPlugin( menuItemHandle, &swatchPlugin );
       // Construct and send a message to the plugin instructing it to execute as if the menu item were invoke by the user
        AIMenuMessage message;
        sSPInterface->SetupMessageData( swatchPlugin, &message.d );
        message.menuItem = menuItemHandle;
        SPErr result;
        sSPInterface->SendMessage( swatchPlugin, kAIMenuCaller, kSelectorAIGoMenuItem, &message, &result );
        sSPInterface->EmptyMessageData( swatchPlugin, &message.d );
    Glen.

    That's a clever solution to a problem I'd never considered (but can see how others might need it) I can't think of a better way to invoke it though than what you're doing except maybe with some minor improvements. If you know the menu group, you can use AIMenuSuite::GetMenuGroupRange() to jump to that group in the overall list. Also, since menuitems seem extremely unlikely to change, you can probably cache the handle.
    Beyond that, the usual suggestion I'd make it is to at least explore actions. Try recording an action and see if it even picks up when you display the Swatches panel. I'm guessing it doesn't record stuff like that, but who knows?

  • Issue in invoking the BPEL process from Oracle using a SOAP Request

    Hi,
    We are facing an issue while invoking a deployed Bpel Process from Oracle Applications 11.5.10..
    Using a concurrent program( Unix / Host program ) we are passing the input variables required for the Bpel process in the ProcessRequest tags and forming this as a SOAP message payload.
    Then trying to invoke the deployed bpel process using the end point location using HTTP POST..but nothing is happening..
    The bpel process is not getting invoked when i look at the Console and also checked for the Manual Recovery queue..it's not stuck there as well..
    Have set the Transfer Time Out to 25 minutes using UTL_HTTP.SET_TRANSFER_TIMEOUT(1500);
    Could someone please help us as soon as possible with this ..as this is critical and we are stuck at the moment.
    The logic is mentioned below :
    UTL_HTTP.SET_TRANSFER_TIMEOUT(1500);
    UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(ENABLE=>TRUE);     
    soap_request:='<?xml version="1.0" encoding="UTF-8"?>'||
    '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'||
    '<soap:Header/>'||
    '<soap:Body xmlns:ns1="http://xmlns.oracle.com/bpelprocessname">'||
    '<ns1:bpelprocessnameProcessRequest>'||
    '<ns1:CSONum>'||order_number||'</ns1:CSONum>'||
    '<ns1:CreationDate>'||c_chr_cso_last_run_dte||'</ns1:CreationDate>'||
    '</ns1:bpelprocessnameProcessRequest>'||
    '</soap:Body>'||
    '</soap:Envelope>';          
    http_req:= utl_http.begin_request
    ('http://bpel_server ip:port/orabpel/domain_name/bpelprocessname/1.0' , 'POST', 'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    utl_http.set_header(http_req, 'SOAPAction', 'process');
    utl_http.write_text(http_req, soap_request) ;
    http_resp:= utl_http.get_response(http_req) ;
    utl_http.read_text(http_resp, soap_respond) ;
    utl_http.end_response(http_resp) ;
    dbms_output.put_line(soap_respond);
    Thanks

    check if your soap envelope is correct,check my below procedure which is working fine for me
    procedure xxxxx_BPEL_SCHEDULER
    IS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    launch_url varchar2(240) ;
    begin
    soap_request:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:star="http://xmlns.oracle.com/xxxxx_BPEL_SCHEDULER">
    <soapenv:Header>
    <add:MessageID>?</add:MessageID>
    <add:ReplyTo>
    <add:Address>?</add:Address>
    <!--Optional:-->
    <add:ReferenceProperties>
    <!--You may enter ANY elements at this point-->
    </add:ReferenceProperties>
    <!--Optional:-->
    <add:PortType>?</add:PortType>
    <!--Optional:-->
    <add:ServiceName PortName="?">?</add:ServiceName>
    <!--You may enter ANY elements at this point-->
    </add:ReplyTo>
    </soapenv:Header>
    <soapenv:Body>
    <star:STARS_BPEL_SCHEDULERProcessRequest>
    <star:SCHEDULER_PARAM1>?</star:SCHEDULER_PARAM1>
    <star:SCHEDULER_PARAM2>?</star:SCHEDULER_PARAM2>
    <star:SCHEDULER_PARAM3>?</star:SCHEDULER_PARAM3>
    <star:SCHEDULER_PARAM4>?</star:SCHEDULER_PARAM4>
    <star:SCHEDULER_PARAM5>?</star:SCHEDULER_PARAM5>
    </star:STARS_BPEL_SCHEDULERProcessRequest>
    </soapenv:Body>
    </soapenv:Envelope>';
    http_req:= utl_http.begin_request('http://xxxxxx.com:16000/orabpel/default/xxxx_BPEL_SCHEDULER/1.0 '
    ,'POST',
    'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    utl_http.set_header(http_req, 'SOAPAction', 'initiate');
    utl_http.write_text(http_req, soap_request) ;
    http_resp:= utl_http.get_response(http_req) ;
    utl_http.read_text(http_resp, soap_respond) ;
    utl_http.end_response(http_resp) ;
    dbms_output.put_line(soap_respond);
    END;

Maybe you are looking for