How to launch a browser from a java/MAC application

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 launch 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

  • How to launch my RESTful TEST with JAVA EE application in NetBeans 6.5

    Hi, I want to TEST my RESTful WebService in my JAVA Enterprise Application.
    I have a bit database in my EJB Module. Resuming, I have two modules (EJB + WAR) and Enterprise Application (JAVA EE that contains the before modules). Appears two kind of errors:
    1) When I only deploy JAVA Enterprise Project an then I run my TEST Restful, appears an error that says: "Another module has been deployed" . This error is about JAVA Enterprise Application has been deploy before.
    2) If I only deploy TEST Restful, this doesn't find Facaderemote class of my EJB Module, because WAR Project hasn't the EJB references.
    Thanks a lot.

    VM7, welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.
    db

  • Launching a Browser from a Java Application

    I want to open an HTML page in the "default" browser. I know how to run commands so I could open IE or Netscape but I want to open a browser without having to know what browser they have installed. It would be nice if there is something that isn't platform dependent. Is this possible?

    It would be nice if there is something that isn't platform dependent. So you've seen the java tip
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    I don't think it's that easy to do what you want so that it is portable... sad that the current API doesn't have great support for programs written in other languages than Java.

  • Attempting to launch a help browser from a java application

    I am currently investigating being able to view help html files through launching a browser from my Java application. I have come across the java.lang.Runtime and java.lang.Process classes which allow me to launch a browser like Netscape or Explorer and bring up a html file to view.
    What I want to do is launch the browser and bring up an html index file as well as the required html help file every time a user would like to use the help for my application.
    Is this possible using the other exec commands. If so, how? Is there somewhere I can find a user guide for Netscape and Explorer commands in order to send additional commands to the browser in order to do this.
    Thanks.

    Good news is it must be possible because VisualAge does it but I don't know how.

  • 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.

  • Any new ideas for launching web browser from application

    I have searched the forums trying to find a new way of launching a web browser from a java application. The problem I am having is that on Unix and Linux systems, at least the variety I have access to (not quite sure on what that variety those are as they are not my systems or systems I control), the common method of using Runtime.getRuntime().exec(STRING) with either netscape or mozilla does not work. While using the Runtime.exec method is not the same as a console, I did try on these systems "netscape + A_WEB_ADDRESS" (or mozilla) and it did launch the respective browser with the page, so it appears that at least from the console level, those commands are valid.
    All the forums seem to say that the Runtime.exec method is the way to go. All the source code I have found through links from the forum say the same thing. I have voted on this bug:
    http://developer.java.sun.com/developer/bugParade/bugs/4210168.html
    and the feedback there does seem to indicate that there is similar trouble out there. Below is the code I am using. It does work on Win2000,XP, and Mac OSX. The application is not supported on earlier systems, and as it stands it will not work on Win 95,98, nor ME. Only small modification should be needed for work on those OSs, but as I no longer personally use those OSs, I cannot be sure.
    private void openNativeBrowser(String url) {
    // not the browser itself is started, i only call something like
    // start http://www.javasoft.com
    // and then the standardbrowser will be started ...
    StringBuffer call = new StringBuffer();
    System.err.println(System.getProperty("os.name"));
    System.err.println(System.getProperty("user.dir"));
    try {
    // which OS ?
    String operatingSystem = System.getProperty("os.name");
    // how to call the OS
    if (operatingSystem.toLowerCase().indexOf("windows") > -1)
    call.append("cmd /c start ").append(url);
    else
    if (operatingSystem.toLowerCase().indexOf("mac") > -1)
    call.append("open ").append(url + " &");
    else if(operatingSystem.toLowerCase().indexOf("linux") > -1)
    // use Script 'netscape'
    call.append("mozilla ").append(url).append(" &");
    else
    call.append("netscape ").append(url).append(" &");
    System.err.println(call.toString());
    // start it ...
    Runtime.getRuntime().exec(call.toString());
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    As I said, if you have a new way to call the broswer that seems to work on either Unix or Linux, please post it, point to it, or explain it.
    Aaron

    there is a shell script on Linux called htmlview that you can launch like this:
    String[] cmd = {"htmlview", "http://java.sun.com"};
    try {
        Runtime.getRuntime().exec(cmd);
    } catch (IOException ioe) {
        // do something
    }which will open the default browser. Don't think this is available on other *NIX though, although the script itself would probably work so you could include it with your app (/usr/bin/htmlview).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • Calling a soap web service from a java desktop application

    Hi,
    Does anyone know how to call a soap web service from a java desktop application? I've seen examples using Apache Axis, but it sounds like Axis needs to run on a web server and we are trying to avoid that. My initial thought was that, "of course we need a web server", but I'm wondering if there is a way to do this without a web server.
    Any help is greatly appreciated.
    thank you,
    Julie

    If you are the consumer you don't need any web server. The web server is only needed in the provider end.
    In java 6 there is a built in framework to call web services without the need of third parties (such as apache axis)
    take a look at:
    https://jax-ws.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html
    http://java.sun.com/webservices/technologies/index.jsp
    For the provider end there is also a built in http server to expose web service via HTTP without the need to
    use any external web server.
    take a look at:
    http://java.sun.com/javase/6/docs/api/javax/xml/ws/Endpoint.html

  • How do I move apps from an old mac to a new one

    I am purchasing a new Macbook Pro after having my old one for six years. I have numerous apps that I have purchased and downloaded over the years. I don't want to loose them and really don't want to have to purchase them again. Can I and how can I move apps from my old Mac to my new one?

    Be sure you back your current system up BEFORE you do anything. If you use Time Machine, migration assistant works well.
    Barry

  • I have and apple tv,,..how do i play movies,from my apple mac,onto the apple tv..my movies are not on my itunes,but on an external hard drive...i just want to mirrow whats playing,on my mac to the tv...

    I have and apple tv,,..how do i play movies,from my apple mac,onto the apple tv..my movies are not on my itunes,but on an external hard drive...i just want to mirrow whats playing,on my mac to the tv...

    Are the movies in the correct format:
    Video formats
    H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
    MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
    Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    Audio formats supported
    HE-AAC (V1), AAC (16 to 320 Kbps), protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4), Apple Lossless, AIFF, and WAV; Dolby Digital 5.1 surround sound pass-through
    When you say tit only sees your music folder, are you saying it only sees your music folder or does it see other empty folders.

  • How do I copy files from my old mac to my new mac?

    How do I copy files from my old mac to my new mac?

    Use the Migration Assistant, or the Setup Assistant, or use a network, Target Disk mode, or an external drive to move them manually.
    (126811)

  • How do i transferring video from iphone to mac

    how do i transferring video from iphone to mac, i synced it but nothing shows up

    I don't believe OS X has the ability to receive AirPlay (which is what you're using).  There's some advice on the matter on the Wikipedia page, though:
    http://en.wikipedia.org/wiki/AirTunes
    Scroll down to "Third-party software implementations".

  • How do i get pictures from iphone to mac?

    How do i get pictures from iphone to mac?

    If you want your photos to end up in iPhoto, just do a normal sync. If you don't want to use iPhoto, or if you just want to put your phone photos in a normal visible folder on the desktop, luckily when you plug in the iPhone a Mac sees it like a camera or card reader. This means the iPhone will show up in common applications that have an import-from-camera feature. I've copied photos off my iPhone using Apple Image Capture, PhoneView, and Adobe Lightroom, for example.

  • How to ttransfer itunes music from ipad to mac os x 10.4, itunes 9

    how to transfer itunes music from ipad to mac os x 10.4, itunes 9

    written on the box and Apple's website:
    Syncing with iTunes on a Mac or PC requires: Mac: OS X v10.5.8 or later PC: Windows 7; Windows Vista; or Windows XP Home or Professional with Service Pack 3 or later iTunes 10.5 or later (free download from www.itunes.com/download)

  • How to transfer license key from Windows to Mac for adobe photoshop lightroom 5?

    how to transfer license key from Windows to Mac for adobe photoshop lightroom 5?

    You can download from this link and validate with your serial number. You can run LR5 on both machines.
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5856

Maybe you are looking for

  • Control break events

    Hi sdn, i have a problem when i grouping the materials under the same invoice. EX: date   address  invoice  material     1         apple                                     tomato                                     banana      2         apple       

  • Regarding types statement in ECC 6.0...plz reply..urgent

    Hi, I am copying a program which is in<b> 4.7 to ECC 6.0,</b>i am facing error regarding <b>structures with types<b>... The following code in<b> 4.7</b> <b>DATA:BEGIN OF W_BMM00.         INCLUDE STRUCTURE BMM00. DATA:END OF W_BMM00. DATA:BEGIN OF W_B

  • Problems calibrating LCD.

    Help, my LCD is too warm (yellow) and I can't calibrate it away. I had already noticed my 12" PB display was a bit off colour compared to others but when I recently connected it to an external monitor, the difference was shocking. Now as I write, I h

  • Updating 7.1.0 to 7.1.1 using msiexec /quiet fails

    I need to roll-out patches 7.1.1 (and eventually 7.1.2 and 7.1.3) to our entire organization of 7.1.0. I have two commands which I am testing: 1. msiexec /quiet /patch 711.msp 2. msiexec /patch 711.msp I need to use command 1. as I do not want my use

  • Multiple event log errors with Indesign.exe

    A colleague is having some issues with CS3 and certain programs keep crashing and she has to keep restarting. I've not been given any further info at this stage so  I decided to delve into her event logs. Doing so uncovered a number of different InDe