BASH - Launch App with arguments

I'm trying to write a simple BASH script that will laungh an program, but that program needs command line arguments.
When I put it in quotes it says it can't find the file, if I don't use quotes then it won't run the program with the command line arguments. How can I launch a program using a BASH script with command line arguments?
Thanks in advance

Wrong forum. Try https://discussions.apple.com/community/mac_os/mac_os_x_technologies#/?tagSet=10 48

Similar Messages

  • Launch apps with oracle jre 7

    With Apple discontinuing support jre 7 on its mountain lion, i am trying to find a way to launch my mac apps with oracle jre7. There are two situations occuring to me.
    1. Oracle jre7 could be before hand installed and my app should be able to detect and launch
    2 Or Bundle the oracle jre 7 with my Mac app and get into lauching it on mountain lion without any issues.
    Is there a better way or apple providing support in this regards.
    Help appreciated.

    Thanks NickClark_uk,
      I am able to install the java 7, but the Mac app i am trying to launch is unable to detect the oracle jre 7 and works fine with app store jre's. So we may need to bundle the jre or modify our apps to detect the installed JRE.
    I was looking at what would be the better approach in order to have my Mac app run with oracle jre 7.
    Thanks

  • BASH Script - Launch App with

    I'm trying to write a simple BASH script that will laungh an program, but that program needs command line arguments.
    When I put it in quotes it says it can't find the file, if I don't use quotes then it won't run the program with the command line arguments. How can I launch a program using a BASH script with command line arguments?
    Thanks in advance

    #!/bin/bash
    /Users/name/Desktop/Directory/app -f configfile

  • Error "cannot locate object' launching app with Web Start

    Hello,
    I receive the error shown below when launching a Java application and cannot figure out where to begin with debugging. It was developed under Netbeans 5.0.
    You can recreate the error by launching this application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled and would appreciate any help. Thanks.
    Mike
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    The system cannot locate the object specified. Error processing resource 'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    App JNLP File
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
    <title>ztest17</title>
    <vendor>Mike Naglich</vendor>
    <homepage href="www.mikenaglich.net"/>
    <description> </description>
    <icon href="default"/>
    <offline-allowed/>
    <shortcut online="true">
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    </resources>
    <resources>
    <jar download="eager" href="dist/ztest17.jar" main="false"/>
    </resources>
    <resources locale="" os="">
    <jar download="eager" href="dist/lib/swing-layout-1.0.1.jar" main="false" version=""/>
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp>

    I receive the error shown below when launching a Java
    application and cannot figure out where to begin with
    debugging. There are a number of problems, potential problems,
    redundancies and illogicalities in that JNLP file.
    ...It was developed under Netbeans 5.0. Uh-Huh. I am coming to recognise those
    (damnable) NetBeans JNLP files.
    You can recreate the error I don't think I need to, your error output and JNLP
    file are quite instructive..
    ...by launching this
    application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled
    and would appreciate any help. Thanks.
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please
    correct the error and then click the Refresh button,
    or try again later.
    The system cannot locate the object specified. Error
    processing resource
    'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    1) Whenever you see a message from Java,
    JavaWS, or an application saying words the the
    effect of 'cannot find..', try checking the URL of the
    resource in a browser. If a browser comes
    up '404' (not found), then the Java tool or app.
    will be unable to access it either.
    That is the first and fundamental problem with that
    JNLP. The DOCTYPE element is not strictly needed
    in a JNLP, and I would recommend removing it entirely
    rather than try and hunt down any NetBeans DTD.
    With the way NB writes JNLP's, I would not trust
    a DTD written or controlled by them, in any case.
    App JNLP File
    ===========OK.. I recommend replacing the current JNLP
    with the one below, here is a summary of the
    changes I made..
    - removed DOCTYPE line with reference to '404' DTD
    - compacted resource elements, removing empty attributes
    - changed ztest17.jar to main='true'
    - removed redundant 'download="eager"' attributes as well
    as main="false" and version="" from swing-layout.. jar element
    - removed broken(?) <icon> element and empty <description>
    - changed homepage href to relative
    Some of them are guesses, but I'd give it a 90%+
    chance of working, if written like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
      <title>ztest17</title>
      <vendor>Mike Naglich</vendor>
      <homepage href="/"/>
      <offline-allowed/>
      <shortcut online="true">
        <desktop/>
      </shortcut>
    </information>
    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <jar href="dist/ztest17.jar" main='true' />
      <jar href="dist/lib/swing-layout-1.0.1.jar" />
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp> Note that a glance inside the ztest17.jar supports
    it contains a manifest file tat specifies the main class,
    so it might be possible to remove main='true'
    altogether - best not for the moment, though.

  • Launch App with Native Process

    Hi,
    I want to launch serproxy application (http://www.lspace.nildram.co.uk/freeware.html) using native process in adobe air. But it seems not working.
    Here is my code:
    protected function launchSerproxy():void{
        if(NativeProcess.isSupported){
         var serproxy:File = File.applicationDirectory;
         serproxy = serproxy.resolvePath("serproxy/serproxy.exe");
         var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
         nativeProcessStartupInfo.executable = serproxy;
         var process:NativeProcess = new NativeProcess();
         process.start(nativeProcessStartupInfo);
         // connect to the com port
         setTimeout(connect,1500,"127.0.0.1",5339);
    Flex did not return any error or problem on runtime. What should I do to have Adobe Air load and run serproxy? Thanks.

    I think you just missing the working directory.
    "nativeProcessStartupInfo.workingDirectory = File.applicationDirectory;"

  • Launching apps with Applescript

    I'm like a drunk driver wheb it comes to Applescript.
    I use Final Cut Pro to edit video and have a time tracker program to keep track of the time I spend editing. Is there an Applescript that will launch the time program when I launch Final Cut Pro?
    thanks for the help.

    I am a bit crippled at the moment when writing scripts as my mac is currently in for repairs, so am using my parents windows pc.
    I believe there are a number of ways of attacking this problem. Either have a small program always open checking for final cut launch or have a small application that launches both your time tracking program and final cut.
    i prefer the second method as it free up systems resources (not much but i always prefer having as little open as possible in regards to background processes). SO i would use something like this:
    tell application "Time Tracker"
    activate
    tell application "Final Cut Pro"
    activate
    end
    end.
    I would save it as an application named so it where final cut pro is, and then always use this applciation to launch final cut pro.
    However if you launch final cut another way, for example open up a document file that launches final cut pro then this method will not work and the first method described would be a better way of achieveing this. However i am at best a confident novice in regards to applescript and being hindered by not having my mac to try it out on, i can only give pointers.
    I believe this will check every 5 seconds for an instance of final cut pro. You can make the time intveral shorter or longer if you wish. I think the option you want to save it as is called "always open" and then in system preferences - accounts - login items select the script.
    if process "Final Cut Pro" exsists then
    activate application "Time Tracker"
    delay 5
    end
    As i said before this may not work correctly and can only check when my iMac comes back from being repaired (new screen, logic board and psu, so basically replaced but inside the same case). I am sure someone else will step in and offer help in the mean time if i have got something wrong.

  • I upgraded my new iPad (iPad 3) to IOS 6 and everything went well except Siri won't launch apps. When asked say "launch Facebook" Siri responds with "it doesn't look like you have an app named Facebook" and I get the same results when trying to launch any

    I upgraded my new iPad (iPad 3) to IOS 6 and everything went well except Siri won’t launch apps. When asked say “launch Facebook” Siri responds with “it doesn’t look like you have an app named Facebook” and I get the same results when trying to launch any app. Siri works for everything else it just won’t launch apps. Any ideas? Thanks.

    I have this same problem... Seems like nobody else does. Siri won't launch any apps for me, including native apps.

  • Using SSL with client auth from a JNLP-launched app

    We have an application that is launched by JNLP, and which needs to make a mutually authenticated SSL connection to a server. The client cert and trusted certs that it needs to do this are stored in the Sun\Java\Deployment\security directory where JNLP knows to look for them. And Java WebStart itself seems to be able to use these certs just fine. However, our app seems blithely unaware of the location of the keystore/truststore unless we explicitly set the system properties javax.net.ssl.keystore and truststore. But we don't want to do that (it could be different for different users), and we shouldn't have to do that. So the question is, how can we use the same KeyManager/TrustManager that Java WebStart itself is using? Are they somehow available for the JNLP-launched app to use?
    Failing that, is there a way for a JNLP-launched app to query the deployment properties? There are a bunch of properties to direct the behavior of Java WebStart (see [http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html]), such as deployment.user.security.trusted.cacerts. These don't seem to be System properties. Can the app see them, or are the "private" to Java WebStart itself?

    HI:
    see also shine enterprise pattern.
    I have worked with it and it helps me and results spead up.
    it has a class which is named "code" and does encryption and ... by md5. it is incredibly secure! tey it.
    you can download it via links bellow:
    http://groups.google.com/group/j2sos.
    http://sourceforge.net/projects/shine-enterpris/
    it has also document

  • Launching a new app with a product for free  app is almost completed where do we start?

    We are going to be launching a new product that needs a code  attached to it for a free app with purchase of product. does anyone know where to start app is almost completed

    Any more detail that anyone can share on buying apps and balk and art is that the only way to sell a product with a free app if you buy the product? were not really looking for the easiest method we will have the app up on iTunes for 1.99 if you do not buy the product.

  • Trying to close an app with a shell script which was launched by same app.

    This may be simple, but is confusing me. I have an app that executes a shell script at launch. The script is designed to check for the existence of files and if not found, I want to display a message and close the application. The problem seems to be that I can't close the app with the script, since the script was called by the app and the shell is tied up. Does that make sense? I can't close the app because the script/shell is still active. Any ideas?

    Just have the script output some value for the app to read and then quit. Once the app reads the value, it will wait for the script to quit (shouldn't take long, especially if the script isn't running anymore) and then, if the value is a flag to quit, quit.

  • Launching apps 11.5.10 with different users

    Is it possible to launch apps 11.5.10 with two different usernames on the same instance?

    Hi,
    Have a look at the following documents:
    Note: 272585.1 - Users Cannot Open Multiple Forms Sessions On The Same PC In Applications 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=272585.1
    Note:375403.1 - How Can I Restrict Applications Users To Be Signed In Only Once At Any Time
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=375403.1
    I have also found one thread which was created by you and cover the same issue.
    Multiple sessions of Oracle APPS open for the same instance? how possib
    Multiple instances of APPS for the same database?
    Regards,
    Hussein

  • PAINFULLY SLOW launch times with MS Office 2004 Apps?

    Anyone else noticing painfully slow launch times with their MS Office 2004 Apps? It seems that each time I restart my machine and try to open any kind of office document the Word icon will bounce at least 15 times and then it takes forever for the application to actually launch. Once launched it seems fast and works fine, but not on initial launch after restart.
    Is this a Rosetta issue? Should I reinstall the MS Office apps?
    -JB

    Seems ok to me. Did you download the latest update which finally allows spotlight to search in Entourage and provide other improvements?
    http://www.microsoft.com/mac/downloads.aspx?pid=download&location=/mac/download/ office2004/Office2004_11.2.3.xml&secid=4&ssid=29&flgnosysreq=True
    "Microsoft Office 2004 for Mac 11.2.3 Update
    After you install this update, you can use Mac OS X Sync Services and Spotlight searches to sync and find Entourage items, use smart cards with Entourage 2004, and enjoy improved overall security and stability when using Microsoft Word 2004, Excel 2004, PowerPoint 2004, and Entourage 2004. This update also includes all of the improvements released in all previous Office 2004 updates.
    Applies to: Microsoft Office 2004 Standard Edition, Office 2004 Student and Teacher Edition, Office 2004 Professional Edition, Entourage 2004.
    Released: March 14, 2006"

  • Has anyone out there experienced problems with launching apps after downloading the iOS 5.1?

    Has anyone out there experienced problems with launching apps after downloading the iOS 5.1?

    I tried calling support and they want to sell me $79 worth of support in order to get it straightened out!

  • Execute launch external program with arguments on Windows Mobile

    Hy, i try to *run an external application with arguments* from my MIDlet on Windows ME :
    microedition.platform     intent JTE
    microedition.configuration     CLDC-1.1
    microedition.profiles     MIDP-2.0
    String urlToLaunch = "/Program Files/MyProgram/MyProgram.exe";
    String arguments = "arg1 arg2 arg3";
    String urlToLaunchArgs = urlToLaunch = urlToLaunch+" "+arguments;
    platformRequest(urlToLaunchArgs);The PDA return : Can't open file '/Program Files/MyProgram/MyProgram.exe arg1 arg2 arg3'
    With no argument (urlToLaunchArgs = "/Program Files/MyProgram/MyProgram.exe") it's work fine.
    With arguments (urlToLaunchArgs = "/Program Files/MyProgram/MyProgram.exe arg1 arg2") it doesn't work...
    If somebody have a solution to propose...
    ... or another way/method to explain...
    Thank you.

    > SAPService<SID> and <SID>ADM both have Administrator rights for the server.
    > That means they should have full access.
    No - this is no more true like that since Windows 2008, it's a bit more complex:
    http://en.wikipedia.org/wiki/User_Account_Control
    > Where would you setup the permission/policy to "interact with the desktop"?
    Add the policy using group policy editor (gpedit.msc)
    Markus

  • Launch apps one at a time and disable iTunes at startup

    Hey guys
    I have two questions:
    The first one is, is there any way to launch apps at Login but one after the other and not all at the same time? For instance, I would like to launch Adobe Ps, then Ai after Ps loaded, then Mail, and then others. Is this possible?
    The second one is, how can I disable iTunes from launching at Login? I've checked my Starup Items and iTunes is not on the list. Also, I've right clicked the icon in the Dock and "Open at Login" is disable as well but it keeps launching every single time I start up my computer.
    Any helps is much appreciated.

    In my case, I do need to launch Adobe Ps, Ai and Br, Mail, iChat, Safari, Pages and Cinema 4D every single day for work. Almost everything opens up fast, but like you said, Adobe apps take a lot of memory so they take longer to open. I really hate waiting for these to open up, so I'm looking for a way to make them launch one at a time as soon as I get into the office while I take care of some paper work.
    In that case I don't think you need to put in a delay in between the apps to make sure the next only opens after the earlier is finished. I open 5 apps every morning with no delay in between and it always goes smoothly and very fast. Try that first then you can go back and edit the workflow to add the pauses in if you need it.
    Is Automator user friendly? I've never used it before. Is it very easy to understand and setup?
    It's very user friendly. I've only made about 3 apps (each workflow can be saved as it's own application), the launching multiple application being the last one and it was very easy, took about 5 minutes to create. Of course, someone on here had told me how to do it so that made it very easy.
    Unfortunately, I haven't upgraded to Leopard yet and it looks like the interface is very different from Tiger. In Tiger when you open Automator it gives you a list of applications on the left, click on one to select and it will then give you a list of actions available for that application just to the right of that. Double click on the action and it adds it in as your workflow in a large space on the right.
    In this case the app I chose was Finder, then Launch Application action. When that is added to the workflow I then had a popup menu of all my apps in my Applications folder so I would just choose the one I wanted. There is even an Other at the bottom to choose an app from elsewhere in case you have any outside the main Applications folder.
    To add the pause select Automator from the left hand list of apps and you get a new list of actions, double click on Wait For User Action, which it will put right under the app you are launching as the next step. You can then set the time for how long you want it to wait.
    Then go back to Finder and Launch Application and repeat the process for each app you want to open. All the actions in the workflow can be dragged around as much as you want to create a different order.
    Very simple. Leopard's interface works differently but I suspect you still need to choose Finder to get to Launch Application and Automator to get to Wait For User Action. Each app has it's own set of actions it can perform but they can all be added together for a workflow.
    Then save it as an app and put it on your desktop, or where ever you want, so you can double click to run it then walk away until it's done. Even after saving it you can go back in and edit it at any time, if you wanted to take an app out or add one in, for instance, or want a shorter or longer pause time, etc.

Maybe you are looking for

  • Want to move this forum - any concerns?

    I'd like to move this forum to the following location so that all Solaris developer forums are together in one place:      https://community.oracle.com/community/server_%26_storage_systems/systems-development-and-management-tools/application_d- Do yo

  • Pdf - InDesign - with links

    Hi, I recently found a Multipage script that allows a pdf to be properly imported into InDesign. The problem that I am having is that it does not save hyperlinks once it is imported. I was wondering if anyone knew a way to accomplish this. I could ju

  • Changing domain users desktop wallpaper periodically

    Hi  I know we can set a wallpaper for users from gpedit> Administrative Templates> Desktop.  but is there any way to do this automatically each day or week ? Tanx

  • Purchase order-account assignment

    some one plz explain me various account assignments and their usage in purchase order creation. also, plz explain me can we able to create our own account assignments, if yes plz suggest  me the process flow.

  • Getting error while Installation of EP

    Hi All, I have Installed ABAP Trail Version on D drive of my PC and now when i am trying to install EP on any other drive then it is giving error : ERROR 2009-11-25 04:08:56 FSL-02107 Path component contains reserved character ('"'): "D: ERROR 2009-1