Passing parametes to external program

What is the command to pass parameters to an external progarm from Java interface? I mean how should the exec() command be modified in order to pass paremeters to the external program..
Thanks...

Look at the documentation for the Runtime and ProcessBuilder classes here, there is a variety of ways to pass parameters.
http://java.sun.com/j2se/1.5.0/docs/api/index.html

Similar Messages

  • Execute and pass parameter to external program

    hi all,
    i need to wrap a program using java.
    i would like to write a java program able to ask for user input as soon as wrapped command ask for.
    from the user point of view the behaviour should be the same.
    example
    program to be wrapped: mycommand.exe
    mycommand synopsis
    mycommand file1: mycommand ask for a string and writing it in file file1
    i would like to execute mycommand file1
    in a java program getting the orginal behaviour.
    so...
    String command = "mycommand file1";
    Process process = Runtime.getRuntime().exec(command);
    // from now on somebody can help me?
    thank you
    Luca

    lrasco wrote:
    i would like to write a brute force password cracker (for my own use, i forgot a password).
    rar ask user for password, if ok exit 0 otherwise exit 1 (i suppose).
    my program execute rar, which sholud ask for password, pass a password, check for exit code, then exit or continue.That tells us what you're trying to accomplish, not what problems you're having.
    For the record, I'm extremely skeptical of your claim that this is for the legitimate use of recovering your own password. The proper approach would be to contact the admin to reset it.
    Of course, trying to brute force crack a password by executing an interactive program like this will be extremely slow anyway. Assume a 6 letter password over the 62-character space of uppercase, lowercase, and digits. There are 62^6 = 56,800,235,584 possible passwords. On average, you'll have to search through half of them, which is 28,400,117,792. If you can do 100 / sec., then that will take 28400117792 / 100 / (60 x 60 x 24 x 365) = 9 years.
    EDIT: Stupid math operator markup.
    Edited by: jverd on Jan 13, 2010 11:20 AM
    EDIT: fixed math error
    Edited by: jverd on Jan 13, 2010 11:21 AM

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Pass parameter between programs

    Hi,
    I need to pass one parameter between 3 programs :
    That is the actual flow of my parameter.
    SAPF110V -> RFFOBE_I -> which include ZRFFORI99B)
    get param   <- RFFOBE_I <- set param
    with statments
    SET PARAMETER ID 'ZDBL' FIELD p_doublon.
    GET parameter ID 'ZDBL' FIELD p_doublons.
    But unfortunatly it doesn't work :/  (value of my param = 0)
    I can run the include program in debug because it is run in background...
    I can't use a Ztable
    Any idea to pass value between this flow ?
    Thanks,

    Hello,
    The value which you want to pass between the programs can be stored in the SAP memory space by using the IMPORT and EXPORT to MEMORY ID statement.
    EXPORT <internal table/variable> to MEMORY-ID 'MY MEMORY'.
    Above statement will keep the value in SAP memory by creating a memory named as 'MY MEMORY'.
    IMPORT <internal table/variable> from MEMORY-ID 'MY MEMORY'.
    Above statement will get the value from SAP memory space.
    But while using the above statement please consider that all the three programs should be run in the same session because the Memory that you are using will automatically be cleaned up by the Garbage collector as the session ends.
    Hope it helps.
    Thanks,
    Jayant.
    <<text removed - don't ask for points>>
    Edited by: Matt on Nov 19, 2008 7:48 PM

  • Unable supplying parameter like 'PASSWORD' in external program from SAP

    HI GURUS,
    I am unable supplying parameter like 'PASSWORD' in external program from SAP.
    Is it possible to achieve this? IF it is then how could we suplly Password information to External Program for loging in.
    Thanks
    SANKU.

    Which way you are supplying password ?
    Programtically  ? or ?
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Jul 17, 2009 3:26 PM

  • Error in External programe

    Dear All,
    We are facing error in one of external programe; which is included in one of step of a job. the programe is 'sleep' which is resposible for inserting delay in job e.g. 300 sec. the value 300 is the parameter for the external programe.
    when we run the job this program doesnt stop. keep on giving delay in job. or else in other job it doesnt run .... can any budy suggest hte troubleshooting of the same.
    Thanks in advanse.
    <b>Regards,</b>
    Swapnil Lakhe

    Hello Swapnil,
    The most probable reason that I get from the description is that the counter is never passed back to the job control.
    What you can do as an alternative is write an simple ABAP to loop for 300 secs and then write an message Like "Completed or finished" and enter this ABAP program as an step instead of the External program.
    This should work 100 %.
    Regards
    Amit

  • How to pass BindVariables to External Process (Workflow)

    I build a shell script (unix) which accepts a command line parameter .... a "filename"
    The "filename" is a dynamic name!
    The workflow is build with a custom input parameter "filename" ... which I want to pass to an external process, which calls this shell script:
    How can I do that ?
    ExtProcess:
    Command : Val=/bin/ksh
    Parameter_List : Val=":/home/bin/myscript.sh:${Task.Input}:"
    (Binding ":Filename" replaces the whole value, sorry)
    Succes_Threshold: Val=0
    Script : Val="" , Binding=":Filename"
    ... does not pass the value of ":Filename"
    Script : Val="/tmp/fixed.name"
    ... works only with fixed names
    what I really need is something simple like:
    Parameter_list : Val=":/home/bin/myscript.sh:${Parameter.Filename}:FIXPARAM:"
    or Script : Val=":${Parameter.Filename}:${Parameter.Param2}:${Parameter.Pram3}"
    ... similar problem I had with FTP, I found no way to pass dynamic filenames or other parameters (except LOCATION Parameters)
    ... similar problem I had with EMAIL I found no way to include PARAMETERS to the mail body (except to replace the whole body by 1 parameter)
    Is there a solution or is in current version OWB 9.2 only "static" parameters supported.
    I also was missing to pass OUTPUT-parameters for example of a TRANSFORMation,
    I also was missing some urgent SYSTEM-parameters for self identification of the process(like "SYSTEM.TASK_NAME" "SYSTEM.EXECUTION_AUDIT_ID" "SYSTEM.ITEM_KEY" )
    Thanks for all hints and best regards
    Martin

    Actually... After further investigation this may not be needed. I'd be interested in the answer, to understand what is possible.
    The concept of passing parameters in the OWB workflow designer is rather limited, in my humble opinion. Sure, you can designate a "start" sequence that takes a parameter and you can pass that to mappings/transformations but there is no chance for feedback. Ie, if I manually (or through some rigged script) execute the flow with the "PARAMETER" then it will be able to bind. What about mid-flow. IE, select the record to be "processed", then call a "flow" with that as a parameter.
    Am I mistaken? Is there a way to expose the "out" parameters of a mapping, or the return of a "transformation function" as "OUTS" in the process flow.
    Of course, in a world where everything is OWB and in the DB one can leave data in tables, and pick it up on the other mappings. HOWEVER, most BI systems involve external retrievals, etc. that need a bit more "intelligence" then "run and return 1,2,3" . :)
    Hope this is helpful for product feedback. If I'm mistaken on the WF capabilities please clue me in. :)
    btw, I'm an OWB fan, certainly. The progress over the past two years has been excellent.

  • 'Driver]Parameter missing' Error while trying to pass parameter to MS query & Return Data to Microsoft Excel

    I am trying to set up a parameter query using ODBC-Microsoft Query
    to BMC Remedy The ODBC connection is "AR System ODBC Data Source".
    I want to pass a parameter to modified date field and get all the remedy tickets for which the modified date is<= to the passed parameter date.
    So in MS query, SQL- 
    the query looks like
     WHERE ("Trouble Ticket"."Create Date">={ts '2014-10-01 00:00:00'}) AND ("Trouble Ticket"."Modified-date"<=?)
    I am getting the data fetched from database in the MS query window, but unfortunately
    When I click File-Return Data to Microsoft Excel, its showing an error: Driver]Parameter missing
    I set the connection properties- parameter-Prompt for value using the following string.
    Please help

    Hi,
    Based on the error message, I recommend we try the suggestion: Replace all "..."  with [...]
    http://www.pcreview.co.uk/forums/error-parameter-query-odbc-remedy-bmc-software-com-t3232964.html
    Then, if you want to connect the Remedy's oracle database, please see the thread:
    http://www.tek-tips.com/viewthread.cfm?qid=1123112
    We may try the workaround: Write an Excel macro which connects to the database and fetch the data based on the SQL query.
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If you have further question about write macro, I recommend you post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How can I display files in external program like Word?

    Using NetBeans 6.5, IE7, Windows XP
    I have not had any luck attempting to get a PDF file to display in a separate browser window,
    so I thought I might try to combine that with a new issue.
    I have 3 file types - jpg, rtf and pdf that should be able to be displayed in external programs like Word or Adobe.
    Is there a way to start an external application and pass the file name from a backing bean?
    The files would be located on the server in a directory that is mapped to the client and the applications (Word, etc.) would reside on the client.
    Can this be done from within the confines of a JSF application?
    Thanks

    I was kind of hoping that someone could point me to an example of how to do this.
    I've tried the servlet approach, but can't seem to get the file to display in a separate browser window.
    That is why I thought about maybe launching a separate application, if that is possible.

  • How can an add-on like Firesheep access and execute an external program like Winpcap? Is that a security flaw in Firefox?

    I have been reading about the Firesheep add-on that allows the user to hijack sessions of users on the network by stealing the cookie. I understand that to prevent any application from stealing the cookie, the cookie should not be passed by the site without SSL. However, my understanding of how Firesheep works is that it interfaces with Winpcap (a network sniffer). So my question is "How can an add-on execute an external program or operating system command like Winpcap?" Can any add-on do this and should I be extremely afraid of downloading any add-on because of the potential that it could have complete access to my system?

    Hi Scott-L.
    You asked a very good question and it turns out you're right.
    However, one must be aware that download an Addon on another website that Mozilla may be dangerous. Indeed, the Addons found on the Addon Center are checked (roughly).
    In addition, Firefox includes a blacklist that blocks addons identified as malicious.
    More information here: [http://www.computerworld.com/s/article/9193420/Mozilla_No_kill_switch_for_Firesheep_add_on?taxonomyId=17&pageNumber=1]

  • How to pass parameter into a source variable of a invoke activity

    I'm an new BPELer, I created a invoke activity to submit Oracle Appplications concurrent program, but I don't know how to pass parameter into source variable.
    BTW, I have created the mapper file (.xsl) file.
    could anyone tell me how to do that?
    Thanks,
    Victor

    Hi.
    How you start application? I think you send message to webservice(BPEL process is webservice too). So construct message with variable and value.
    But I created only processes where input value doesn't matter. I haven't use mapper yet too.

  • Can't pass parameter's to a transaction in a new win and skip first screen.

    Dear experts,
    I'm trying to open a  transaction('CV04N') in a new window from a screen that has input box and a pushbutton. I'm trying to pass parameter(DOKNR/'CV1') into the new transaction and skip the first selection-screen. I tried to use Get/Set parameter and that didn't work.
    Also i tried to passing values with batch input and that did pass my values but without skipping the first screen and also it froze the transaction.
    Is there anything I can do to fix this problem?

    Hi Gershon Osmolovski,
    Alvaro is right, CV04N needs to press Execute button. So you need to use Batch Input. If it doesn't work, there must be an error in your code, what messages are returned by SAP? I have tested right now, SAP leaves immediately after the selection screen because there is a code that stops the program if it detects it runs using batch input (SY-BINPT system field). So, you should run CALL TRANSACTION with OPTIONS FROM structured data object (data type CTU_PARAMS, see ABAP documentation for more information), with component NOBINPT='X'. Be careful as an ALV grid is then displayed, you can only simulate the buttons so I advise you to indicate the exaction selection in the selection screen, then press "select all", and execute the function you want.
    If you need more help, paste your code, only useful part.
    BR
    Sandra

  • Insert into SAP table from external program

    Hi Gurus,
    I need to perform an insert of several records into a couple of SAP tables from an external program.
    Do you know of an RFC (if it is remote enabled the better) that allows me to specify the table and records to perfom an insert?
    Many thanks
    Mauricio Pego

    I don't know ABAP and wanted to avoid writing my own function if one standard exists.
    My requirement stands like this, I have a few z tables that need to populate from my C# application by use of the .Net connector.
    I haven't found a BAPI or RFC that allows me to add records to any table, but I don't know all the RFCs.
    May be one of you passed throu this already.
    Mauricio

  • Can i pass parameter or global variable in view from 6i form

    hi master
    sir can i pass parameter or global variable in view from 6i form
    i use view for some diff column calculation within the date then i use
    where date between data1 and date2
    in view but view not create
    please give me idea how i pass external value in view
    thank
    aamir

    Hi Antony!
    I feel it may not produce the right results if you
    dont include the where clause and using only group by
    in view.You felt? Please clear, logical thoughts put here, not feelings.
    (It may very well have all the Debit, Credit
    for all the Accid where as the user wants only for
    r some date range)Data range is determinated in Form by user, so if view should give final data set then you must back
    on Ranjana first question: How to pass parameter or global variable to view from 6i form?
    And also as Ranjit pointed out, If you have only
    accid, sum(debit), sum(credit) in View, wheres this
    enddate ??Of course, column entdate (or enddate?) must be included in view...
    Cheers!

  • Calling an external program (*.exe file) on the client

    Hi,
    I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client.
    So it should be something like a mixture between host and client_host(webutil) command. Is it possible to use client_host where a virtual path is passed to?
    Regards Sören

    Are you saying you want to run on the exe on the client but its located on the server???
    In that case you would have to do a webutil file transfer to move it to the client before executing. Or, if you are calling a DLL, webutil will download it automatically from the server to the client (see the C API example on the webutil page).
    Regards
    Grant Ronald
    Forms Product Management

Maybe you are looking for

  • SAP Adaptor for Oracle Installation Help

    Hi, I am newbie, I am looking for help in installing SAP Adaptor for Oracle. My Idea is to do some RFC calls to fetch data from SAP into Oracle database. I am looking for what is my starting points, what to install and configurations. If you can help

  • Cost center in MIGO  (Movement Type : 161)

    Hi, i've created a PO with a Return item (the price is different from the PO), when i receive it with MIGO i have the following Error message : " Account 61522200 requires an assignment to a CO object " Please how to solve this ? knowing that i can't

  • BP , Activitites - Migration from CRM 4.0 to CRM 2007

    Hi Experts, We are planning to mirgrate the following Data from CRM 4.0 to CRM 6.0 1)  Business Partner with relationship and Attachment 2)  Activities  What could be the best approach to migrate? How can we record the BP data with relation from the

  • Aperture 2 and iPhoto library

    I know one can import the iPhoto library into the Aperture projects pane. and have it as referenced images. If you then add an delete images via the iPhoto application, how do you update the iPhoto images seen in Aperture?

  • String - replaceAll / with // 's

    hello fellow java developers! Im having some trouble, and it seems retarded. I have a String in the format "aaa/bbb/ccc/ddd" and I want to convert it to the format "aaa//bbb//ccc//ddd" I tried strPath = strPath.replace("\\", "\\\\"); - but its giving