How to launch the default web browser from a java app on MAC

I know, this topic has been brought up over, and over, however I couldn't find info regarding MAC environments. I don't have any former experience with MAC, but now I'm getting desperate for a solution. I need to be able to pop up the default browser showing a certain URL on MAC/OS. Any clue would be appreciated.
thanks,
m. berdan

I wrote libraies that will do this:
http://ostermiller.org/utils/Browser.html
I also keep a list of other resources to help you out:
http://dmoz.org/Bookmarks/D/deadsea/Java_Help/Web_Browser/
Stephen

Similar Messages

  • Launch a default web browser from my java application

    Hello,
    I have been trying to launch my default web browser from my java application, but am unable do it. Right now, I am using ---- "Runtime.getRuntime().exec("cmd /c start <url>"); to launch my webbrowser. It launches the browser but displays the command prompt for a second or so, and then replaces my already existing page with the new url.
    Is there any way for me to launch the url in a completely new browser each and every time. And I don't want the command prompt to show up for a sec. Please help...!
    Thanks in advance.
    -BusyBusyBee

    If by any chance your application is an Applet, you can use this to open a new browser window:
    getAppletContext().showDocument(new URL(theUrl), "_blank");
    But, you probably would have specified if that were the case. Oh well. Hope it helps someone!
    -sheepy.

  • How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to Change the Default SSH Port from Terminal ? now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • Open URL in Web Browser from a Java Application

    Hi,
    I have an HTML document that I want to load in a browser window by clicking on a button in my java GUI application.
    Any suggestions?
    Thanks.

    You can use the Process class to start the web browser with the proper command line arguments (depends on the web browser though). Or on windows, you can have your program create a batch file with the code start url (where [url] is your url), and this will open the default web browser when run (again you must run it with a Process).

  • How to reset the network IP address from terminal/command line in Mac OSX?

    Do anyone knows how to set the network IP address from terminal/command line in Mac OS X?

    how about a GUI, ever heard of a GUI? it's this really neat thing, where you don't have to worry about remembering long strings of text to do something. Mac OS X actually has a rather decent one (that was sarcasm by the way, Mac is the best) you could have it done in like 30 sec, if you use the network pane of system preferences.

  • How can I launch a web browser from my Java application?

    I've reed about this at Question of the Week (http://developer.java.sun.com/developer/qow/archive/15/index.html). It doesn't work for me. I'm running win2000 and trying:
    try {
    Runtime.getRuntime().exec("start iexplore http://java.sun.com");
    } catch (Exception e) {
    System.out.println( e.getMessage() );
    I get:
    CreateProcess: start iexplore http://java.sun.com error=2
    What's wrong?

    This function will launch the default browser under Windows.
    public static void displayURL(String url) throws IOException   {
        String cmd = null;
        Process p;
        try  {
            String os = System.getProperty("os.name");     
            if (os != null && os.startsWith("Windows")) {
                if (os.startsWith("Windows 9") || os.startsWith("Windows Me"))  // Windows 9x/Me
                    cmd = "start " + url;
                else // Windows NT/2000/XP
                    cmd = "cmd /c start " + url;
                p = Runtime.getRuntime().exec(cmd);     
        catch(IOException x)        {
            // couldn't exec browser
            System.err.println("Could not invoke browser, command=" + cmd);

  • How to set my default web browser

    I remember choosing between Netscape and Internet Explorer my default browser nearly four years ago. Now I can't remember how to do it again. My browsers currently are Netscape 7.2 and IE 5.2.3.
    Thanks in advance.
    ~~Raymon

    Never mind, friends.
    I got a clue from doing a search on "default browser". Hello!
    It's System Preferences/Internet --> Web tab --> Default Web Browser.
    ~~Raymon

  • How secure is the default web services?

    Just curious how secure the default web services configuration is.
    Would mod_security need to be installed?
    The server would only host 2 sites but I am concerned about basic security.

    Your question is too vague to be answerable.
    Any web server security depends largely on what you're doing.
    If you're just serving static pages then its pretty secure - there isn't much anyone can do to compromise your server.
    If you're running any kind of dynamic content then your security depends on a) the server-side engine you use (e.g. PHP, Java, Ruby, etc.) and b) the competency of whoever's writing your code.
    If you're using any kind of database-driven content then your security also depends on your database engine, and your ability to secure your database.
    The upshot is that the software as delivered is only as good as how you configure and run it. mod_security (if you take the time to configure it) offers some protection, but it doesn't beat taking the time to code your application correctly.

  • How To Script The F11 Web Browser Key Functionality?

    You've seen many Home pages that give you the choice of
    screen res. When you click a res, say full-screen, the new page
    opens up in a secondary popup and fills the screen.
    Yuck. This is not what I'm looking for.
    However, what I want to know is, can a swf be Actionscripted
    - not Javascripted - to carry out the F11 web browser key
    functionality, whereby when the swf loads in the Home page, it sets
    the web browser into kiosk or full-screen mode without using
    Javascript or HTML instructions in the HTML/xHTML head (E 7 Beta
    totally ignores these "arcane" instructions which is a real shame
    and a major pain in the butt).
    If so, please post the Actionscript on this forum for us all
    to enjoy!
    Fingers are crossed with this one.....

    Hello
    Here's another way you may try.
    --SCRIPT
    set rb to "# get bundle id of default browser
    require 'osx/cocoa'
    include OSX
    url = NSURL.URLWithString('http://aaa.bbb.ccc')
    app = NSWorkspace.sharedWorkspace.URLForApplicationToOpenURL(url)
    puts NSBundle.bundleWithPath(app.path).bundleIdentifier
    return do shell script "/usr/bin/ruby -e " & rb's quoted form
    --END OF SCRIPT
    Regards,
    H

  • HT1677 How can I change default web-browser?

    Dear Apple
    I love my iPhone 4S and iPad. But I can't find how change default web browser on iOS? If this OS doesn't do it. Could you tell about it in future?

    You can indicate your interest in such a feature to Apple via their feedback pages:
    http://www.apple.com/feedback
    We're all just fellow users here.
    Regards.

  • How to change the default 'screenshot' save from 'png to jpg'

    Can someone tell me how you change the default on this so I don't have to 'change the file' every single time?

    http://www.macobserver.com/tmo/article/changing_the_default_screenshot_format/

  • How to set the default web site for WGM users

    Hi,
    In Tiger server there was a place to input the URL of the default web page for all browsers when users logged into network home folders. This was really helpful and saved a bunch of bandwidth and class time. Is there any way to do this in Leopard server? If so, please point me in the right direction.
    Thanks,
    ..Tom

    Antonio, Thanks! That seems to have worked for Safari. However, we like Firefox too, and I tried to set that up the same way, but was told "can't find a manifest for that app". I wonder if I can copy the Safari list then alter and rename it?
    ...Tom

  • Opening a web browser from a Java prog

    I am writing a pseudo-wordprocessor, and would like to be able to set a JMenuItem's action so that when a user clicks it, the system default web browser opens with the web page that I have selected. (e.g. open up a "Help" web page).
    The JavaDoc/tutorial doesn't seem to have anything on running external programs from within a Java program, so does nayone know how this is done?

    If you don't want to go the Java Runtime route and make your program a bit more cross-platform friendly, you could use the JEditorPane to render an html page directly in your application (assuming of course that you're using Swing).

Maybe you are looking for

  • Cannot delete file on NAS Drive

    Hello, I was creating a backup of the program VLC on my NAS drive. When copying the file to the drive, it gave an error (which I now cannot recall completely... something about cannot copy certain files). When I went to try and delete the corrupted f

  • Sudden HD, CD and FAN isues with late 2007 24" iMac

    When I play audio cd's with iTunes, the sound sometimes stutters. At least once during each song! I just zapped the PRAM and updated to the latest iTunes version but it makes no difference. Since I installed XP in Bootcamp and updated to 10.5.3 and i

  • Calling a BW Bex Query in Web Dynpro ABAP

    Hi Team, I'm trying to call a BW Bex query in my web dynpro screen. The Web Dynpro is written in our ERP (ECC 6.0) system. I have specific parameters and values in my web dynpro context which I want to pass to a BW query and then display the actual q

  • [Oracle][ODBC][Ora]ORA-01426: numeric overflow

    I have a function get data from data base and do some calculating. I call this function from ASP web page. Some times I got the following error. But if I click refresh later. It's ok again. Any ideas? [Oracle][ODBC][Ora]ORA-01426: numeric overflow

  • Accessing column clicked data value

    I have a datagrid with an itemDoubleClick function. In the function I can get the row and column that was clicked but cannot figure out how to get the value stored in that cell. Using the code.. datarequest.lastResult.MyData.answer[event.rowIndex] .d