Help for Mac Browser Launcher for jvm 5 for Mac OS X 10.5.1

hi im using Mac OS X 10.5.1 and im having a java code BrowserLauncher.java which works properly for earlier verioson of Mac but its not working on this version on jdk1.5. can anyone suggest me how can i get a browser launcher in java for Mac Os X 10.5.1. im using here jdk1.5.
im providing code below which im using right now..    public static void openURL(String url) throws IOException {
        if (!loadedWithoutErrors) {
            throw new IOException("Exception in finding browser: " + errorMessage);
        Object browser = locateBrowser();
        if (browser == null) {
            throw new IOException("Unable to locate browser: " + errorMessage);
        StringBuffer sbUrl = new StringBuffer();
        int urlLength = url.length();
        for (int i = 0; i < urlLength; i++) {
            char urlChar = url.charAt(i);
            if (urlChar == ' ') {
                sbUrl.append("%20");
            } else {
                sbUrl.append(urlChar);
        url = sbUrl.toString();
        switch (jvm) {
            case MRJ_2_0:
                Object aeDesc = null;
                try {
                    aeDesc = aeDescConstructor.newInstance(new Object[]{url});
                    putParameter.invoke(browser, new Object[]{keyDirectObject, aeDesc});
                    sendNoReply.invoke(browser, new Object[]{});
                } catch (InvocationTargetException ite) {
                    throw new IOException("InvocationTargetException while creating AEDesc: " + ite.getMessage());
                } catch (IllegalAccessException iae) {
                    throw new IOException("IllegalAccessException while building AppleEvent: " + iae.getMessage());
                } catch (InstantiationException ie) {
                    throw new IOException("InstantiationException while creating AEDesc: " + ie.getMessage());
                } finally {
                    aeDesc = null;
                    // Encourage it to get disposed if it was created
                    browser = null;
                    // Ditto
                break;
            case MRJ_2_1:
                Runtime.getRuntime().exec(new String[]{(String) browser, url});
                break;
            case MRJ_3_0:
                int[] instance = new int[1];
                int result = ICStart(instance, 0);
                if (result == 0) {
                    int[] selectionStart = new int[]{0};
                    byte[] urlBytes = url.getBytes();
                    int[] selectionEnd = new int[]{urlBytes.length};
                    result = ICLaunchURL(instance[0], new byte[]{0}, urlBytes,
                            urlBytes.length, selectionStart,
                            selectionEnd);
                    if (result == 0) {
                        // Ignore the return value; the URL was launched successfully
                        // regardless of what happens here.
                        ICStop(instance);
                    } else {
                        throw new IOException("Unable to launch URL: " + result);
                } else {
                    throw new IOException("Unable to create an Internet Config instance: " + result);
                break;
            case MRJ_3_1:
            case MRJ_4_1:
                try {
                    openURL.invoke(null, new Object[]{url});
                } catch (InvocationTargetException ite) {
                    throw new IOException("InvocationTargetException while calling openURL: " + ite.getMessage());
                } catch (IllegalAccessException iae) {
                    throw new IOException("IllegalAccessException while calling openURL: " + iae.getMessage());
                break;
            case WINDOWS_NT:
                // Add quotes around the URL to allow ampersands and other special
                // characters to work.
                Process processNT = Runtime.getRuntime().exec(new String[]{(String) browser,
                        FIRST_WINDOWS_PARAMETER,
                        SECOND_WINDOWS_PARAMETER,
                        THIRD_WINDOWS_PARAMETER,
                        url});
                try {
                    // This avoids a memory leak on some versions of Java on Windows.
                    // That's hinted at in <http://developer.java.sun.com/developer/qow/archive/68/>.
                    processNT.waitFor();
                    processNT.exitValue();
                } catch (InterruptedException ie) {
                    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
                break;
            case WINDOWS_9x:
                Process process = Runtime.getRuntime().exec(new String[]{(String) browser,
                        FIRST_WINDOWS_PARAMETER,
                        SECOND_WINDOWS_PARAMETER,
                        url});
                try {
                    process.waitFor();
                    process.exitValue();
                } catch (InterruptedException ie) {
                    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
                break;
            case OTHER:
                // Assume that we're on Unix and that Netscape is installed
                // First, attempt to open the URL in a currently running session of Netscape
                try {
                    process = Runtime.getRuntime().exec(new String[]{(String) browser,
                            NETSCAPE_REMOTE_PARAMETER,
                            NETSCAPE_OPEN_PARAMETER_START +
                                    url +
                                    NETSCAPE_OPEN_PARAMETER_END});
                } catch (IOException exc) {
                    // Netscape does not exist; try Mozilla
                    browser = "mozilla";
                    process = Runtime.getRuntime().exec(browser + " -remote openURL(" + url + ")");
                try {
                    int exitCode = process.waitFor();
                    if (exitCode != 0) {
                        // if Netscape was not open
                        Runtime.getRuntime().exec(new String[]{(String) browser, url});
                } catch (InterruptedException ie) {
                    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
                break;
            default:
                // This should never occur, but if it does, we'll try the simplest thing possible
                Runtime.getRuntime().exec(new String[]{(String) browser, url});
                break;
    }

keeskist wrote:
It's actually not that hard, take a look at http://developer.apple.com/documentation/Java/Reference/1.5.0/appledoc/api/com/apple/eio/FileManager.html#openURL(java.lang.String)
That's what is in the first reply

Similar Messages

  • Problems setting up my TC. Have just bought new iMac(OS 10.6.8) and  TC. I set it up. iMac cannot find it. I have tried direct connection with an ethernet cable to Mac or my wireless router but nothing. Just a flashing orange light. Help for a simpleton p

    Problems setting up my TC. Have just bought new iMac(OS 10.6.8) and  TC. I tried to set it up. iMac cannot find it. I have tried direct connection with an ethernet cable to Mac or direct to my wireless router but nothing. Just a flashing orange light. Help for a simpleton please. Have tried reseting TC, but to no avail.

    Just updated from 10.6.7 ---> 10.6.8 and had the same issue. Despite having done a clean install from 10.6 and got everything back off my TC, now Time Machine can't find it!
    Green light is on, ethernet cable conected, network CP says its conected but nothing. Airport Utility can't find it. Hit reset button, Orange flashing light but still no show in Airport Utility.
    But I know its there, as rebooting from 10.6 SL disk shows the backups are still ok?
    Hmm, ideas anyone?
    SBB

  • How can i deinstall the rotten ADOBE HELP for Flash CS5 an install a new one (Mac OS X 10.6.8 )

    My Flah Help can't download newer Versions and Ressources. So i can't use it. And i have to. And i paied for it.
    So: How can i deinstall the rotten ADOBE HELP for Flash CS5 an install a new one (Mac OS X 10.6.8 )?

    Do you receive an error message when trying to use the help files?  What have you tried so far to resolve your difficulties?

  • My itunes radio rebuffers every 8 seconds - is there any fix or help for this problem.  I am running the latest itunes on a new Mac  with 4MB download speed.

    My itunes radio rebuffers every 8 seconds - is there any fix or help for this problem.  I am running the latest itunes on a new Mac  with 4MB download speed.

    You need to update your Mac OS to at least 10.5.8.
    Itunes 10+ requires Mac OS 10.5.8+

  • Hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • How to install or attach or add the plugins '.mnu and .vlx' to autocad 2012 or 2013 (mac version). In windows, its 'menuload' and express tools, that helps for it. But this command doesn't exist in mac version. so is there any other command or solution?

    How to install or attach or add the plugins '.mnu and .vlx' to autocad 2012 or 2013 (mac version). In windows, its 'menuload' and express tools, that helps for it. But this command doesn't exist in mac version. so is there any other command or solution?

    Please see autocad support at autodesk.com
    http://docs.autodesk.com/ACD/2014/ENU/index.html?url=files/GUID-5E50A846-C80B-4F FD-8DD3-C20B22098008.htm,topicNumber=d30e484012

  • I got a new Mac Pro and I am using my 30 inch cinema display.  It has been flickering grey sometimes and then will stay grey and I have to reboot... this is very annoying..help.  I have reset the pram and that seems to help for a bit but then it starts up

    I got a new Mac Pro and I am using my 30 inch cinema display.  It has been flickering grey sometimes and then will stay grey and lock up my computer and I have to reboot... this is very annoying..help.  I have reset the pram and that seems to help for a bit but then it starts up again...and please don't tell me to check for software updates:)

    I got a new Mac Pro and I am using my 30 inch cinema display.  It has been flickering grey sometimes and then will stay grey and lock up my computer and I have to reboot... this is very annoying..help.  I have reset the pram and that seems to help for a bit but then it starts up again...and please don't tell me to check for software updates:)

  • Where is the help for the latest malware attack on macs from flash player?

    Where is the help for the latest malware attack from flash player?  I am running mac ox x v10.7 lion, and everything that I can find says to download Java and neither of them will work. 10.6 update says its for version 10.6. java for osx date 7 says it will damage hard drive !!!
    How do I know if I have this and what can I do to protect my computer? I JUST DOWNLOADED FLASH PLAYER A WEEK AGO.  I deleted it from my computer but how do I know if I have malware?????????

    There is a new user-friendly Flashback detection-removal tool from F-Secure available here:
    Flashback Removal Tool
    http://www.f-secure.com/weblog/archives/00002346.html
    Apple has promised one also, but it has not yet been released. See
    About Flashback malware
    http://support.apple.com/kb/HT5244

  • Wireless printer sharing- Verizon only has automated help-or any help- for windows. i have a mac.

    i have a new Brother 490CW which instructs me to "push the WiFi protected set up button" on the router. the Verizon supplied router Ultraline series only has on/off power button.  Verizon's help is abysmal.  The automated response sends me back the the help for windows.  can anyone tell me how to set up this printer as wireless?
    thanks.

    Pretty good directions here : http://www.brother-usa.com/support/wireless/Step1.​aspx?ProductID=MFC-490CW
    You'll find the SSID (ESSID) + WEP key on a sticker on the Verizon-supplied router.
    Kevin
    Verizon Telecom
    Fiber Solution Center
    Notice: Content posted by Verizon employees is meant to be informational and does not supercede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

  • Need help for Format HD

    Hi I need Help for Formating HD so Wat Key need hold on start up for format HD I apprciated you Help

    Jesus:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • _Where available_ +Click on Options button+
    +• Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)+
    +• Click OK+
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    cornelius

  • How can one deactivate adobe community help for indesign?

    Hello everyone.
    It seems that everytime I touch a wrong key on the keyboard or do an action Indesign judge not conform, Indesign opens the Adobe Community help software. This takes me away from my ongoing work, bring me to a new window and makes the computer relatively slow for all the time it is loading. It is rather annoying and I tried to deactivate it but never found where and how.
    Does anyone here knwos where to deactivate adobe comnunity help. I cannot stad to have this application open each time I wrong click or miss pres a key like delete/end/page down/etc. on my keyboard. It is absolutely counter productive.
    Thank you for you help.

    Never heard of this before ....
    Are you using the Wireless keyboard ? What is your OS ?
    Do you get the same problem when working in Selective start up on Windows and Safe boot on Mac ?
    I don't think there is a way to turn off the help option in any application , it is in-built , however you can switch the Accesbility mode from Community help application  to Browser 
    Also can restrict the application to look for local help (fownloaded) rather then looking it online.
    This is can be down via Adobe Help community help application preferences.

  • Can we provide new f4 help for a field in a list using grid display

    Hi Gurus,
    Can I provide F4 help for field in edit mode for (which is not using any std. data type, uses only custom char field ) in the list displayed using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
    I know this can be done using OOPS concepts but, I need to know whether it is possible in this manner.
    And please dont suggest me to use CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' to get automatic  f4 help.
    I need to provide F4 help with my own logic once I press F4 in the edited field in GRID_DISPLAY
    Regards
    Mac.

    Hi Macmohan,
    You have to use F4AVAILABL attribute of fieldcatalog to achieve this.
    lv_fldcat-f4availabl = 'X'.
      lv_fldcat-ref_table = 'T582A'.
      lv_fldcat-ref_field = 'ZEITB'.
    This works with ALV GRID CONTROL
    Regards
    Abhii
    Edited by: Abhii on Dec 16, 2009 3:37 PM

  • Help for Internet Explorer 11

    Where do I find Help for Internet Explorer 11 ?
    I have Windows 7 64-bit and IE11 but I can't find help for that latest browser. In Help and Support, I only find help for Internet Explorer 9
    My problem is that since installing IE 11, I am unable to pin pages viewed on the screen to my Favorites; that is the pages that are pinned are different from the pages being viewed.       

    Hi
    from Desktop IE... Help>Online Support menu
    or go to
    http://answers.microsoft.com
    Include the full address of any webpages that you are having issues with.
    Pinning is not the same as Adding to favorites.... Web sites program how their sites are to be pinned or added to the Win7 or Win8 Start menus.
    Regards.
    Rob^_^

  • Intellegent F4 help for contacts in Opp

    Hello All,
    We have the following issue and I hope to get answere from someone. In PCUI on Opportunities Partner Tab when we select contact person Partner Function and click on partner Input Help link it opens a BP search window and user can pick any BP or contact from search result. How can we return only those contacts belonging to the Sales Prospect entered in Opp. Sales Prospect is mandatory for us while creating an Opp. We want to make contact person input help intellegent to return only those for the BP in transaction.
    Thanks inadvance

    There is new feature in CRM 5.0 for value help applications in PC-UI. Its called <b>context sensitive value help</b>. Check the section 5.1.3.7 in the PC-UI cookbook for version 5.0.
    I am coping the section 5.1.3.7 here:
    5.1.3.7 Context sensitive value help
    The current complex value help is not fully context sensitive. It does not consider the information
    the user has already entered on the screen, If it is present in different screen position or in different
    line of a list than the field on which F4 is pressed. Thus, the value help often displays result set
    which are not related in the current context. To make value help context sensitive following points
    must be improved.
    • The complex value help must consider the entries of relevant fields on the calling applications screen as search criteria.
    • The value help application should be enabled to set the value in the <b>Search-Shuffler</b> depending on the current context.
    To implement this feature for any field in the fieldgroup following steps to be performed:
    1. New fieldgroup customizing flag is added the by checking this enables context sensitive search for a input field. Field group customizing is called “<b>Roundtrip CS Search”.</b>
    2. Determine the fields to be transferred to the value help application from calling application
    and create ABAP structure from this fields.This structure is called <b>Context sensitive screenstructure (CS structure)</b>. Assign this CS structure to the complex value help application which is associated with the input field. This is done in:Transaction <b>crmc_blueprint_c</b>
    Open the node “Application/Layout node “
    Edit the value help application
    Enter the name of the structure in the filed “<b>Structure name</b>, Field (F4_CS_STRUCTURE)
    3. PC-UI FW takes the CS structure data from the calling application and defaults them in the value help applications advance search screen structure. Include this CS structure to the advanced screen structure of value help application to have the same fields of CS structure and add the corresponding fields for the CS structure to field group of advance search. This is generally the scrreen structure used in the adv search of value help application.
    4. Implement IF_CRM_BSP_MODEL_ACCESS_IL_2~FILL_F4_STRUCTURE in the calling applications Model Access Class. In this method you fill the value in CS structure which will
    be passed to the value help application.
    Fill the data which is to be passed to the value help application.
    5. Implement / or enhance if already implemented
    IF_CRM_BSP_MODEL_ACCESS_IL_2~CHECK_ACTIVE_SHUFFLER in value help applications MAC. This step is optional, With this you will be able to select the correct
    shuffler based on the context sensitive data passed with new import parameters values to
    this method.
    data in the adv search screen structure based on the cs-data passed to the application to refine their search criteria. In this field they can return the name and value pair table. FW will update SS with this values.
    6. CS screen structure should have field called "ERROR_FLAG" with component type
    CRMT_BSP_F4_CSERROR. When a wrong value is entered in input field and context
    sensitive value help is called, Applications can use this flag to inform FW that wrong data is
    present in the field and FW will add an error message to the application log of value help to
    tell the user that there is wrong data.
    Raj

  • Oracle Help for Java 4.2.0 and 4.1.17

    Attention to all: Oracle Help for Java 4.2.0 and 4.1.17 are now available for download at
    http://otn.oracle.com/software/tech/java/help/content.html
    OHJ 4.2.0 features a new Ice Browser and enhancements related to the known modal dialog problem. It requires JDK 1.3 and is a recommended upgrade for all clients using JDK 1.3 or higher.

    4.1.17 appears to work correctly with RoboHelp.
    4.2 gives an error when attempting to generate fts.idx via RoboHelp.

Maybe you are looking for

  • How do I turn off the downloads window?

    How do I turn off the downloads window? I recently upgraded FF, hated the new one, so downgraded back. When I upgraded I got the new downloads ribbon at the bottom of the screen and no longer had the downloads window. However, for whatever reason I d

  • Gnome-network-manager

    Hi Everybody I just tried to play a little with gnome-network-manager from AUR, first of all the normal network manager was missing a few files, but I managed to find them(http://aur.archlinux.org/packages/networkmanager/networkmanager/). But when i

  • Why can't I add more music to my Garageband Project?

    Hey, I'm having difficulty adding more sounds and music to a very important Garageband project, but I've reached 3:35 in total time and I can't seem to add any more music?

  • Where do I find the Passbook Support Materials?

    Where do I find the Passbook Support Materials that are mentioned in the PassKit Programming Guide?

  • Please answer my itunes question fast

    hello, my name is joseph wiles, and i have a problem. im trying to get 210 songs off my old android phone to my new iphone, but there is a problem. i already have the songs on my itunes on my computer, but when i plug my iphone to my computer it dose