Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double clickable script question[Explanation of SOLUTION]




On 4-Oct-04, David Darby wrote:

Thanks for your suggestions. I've tried the following and still can't
get it to work.

String cmdarray[] = { "sh",
"pathToApp/MyApp.app/Contents/MacOS/JavaApplicationStub", "-client"};
String cmdarray[] = { "/bin/sh",
"pathToApp/MyApp.app/Contents/MacOS/JavaApplicationStub", "-client"};
String cmdarray[] = { "bash",
"pathToApp/MyApp.app/Contents/MacOS/JavaApplicationStub", "-client"};
String cmdarray[] = { "open",
"pathToApp/MyApp.app/Contents/MacOS/JavaApplicationStub", "-client"};

Have you tried something like:

    String cmdarray[] = {
        "java", "-jar",
        "<<path to App bundle>/Contents/.../MyJar.jar",
        "-client" };

Note that doing this will create the ugly effect of launching a
second application, with its own Dock icon, etc. Also, if the
app you launch via exec generates any output, you may need to
explicitly read the output and error streams to keep it from
deadlocking. This is not the preferred solution.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.