Open web page using Runtime.exec?

Hi,
I am going to open a web page as help document in my application. I can do it in Windows. How about in Linux and Mac?
Thanks

It needs a lot of codes to handle the html links.A JEditorPane needs a dozen lines or so of code (I think there is an example either in
Sun's tutorial or in the API documentation itself. Look for HyperlinkListener).
Provided that your help files are reasonably simple (text/images/links) it would
seem a reasonable way to go. Handling the links yourself means that you
can include non standard links like "ex:whatever" to interact with your application
as it's running. Also such pages display sweetly as resources within a .jar file.

Similar Messages

  • Safari wont open web pages using Vista

    After installing Safari on a windows vista PC I keep getting the same message Safari can’t open the page. I am able to open web pages with internet explorer

    I'm using Vista too and have no problems accessing webpages with Safari. Do you use a Proxy? Maybe your Firewall blocks Safari...

  • How to open a web page using indesigncs3  javascript ?

    i cant able to open web pages using this CS3 js.i anyone tell me the syntex?
    thanks
    subha

    Post your question in the forum 'InDesign Scripting'.

  • Opening a new browser using Runtime.exec()...

    I am trying to open a new IE browser window (from Windows) using Runtime.exec( ) command. The problem is that it uses the existing browser window instead of opening a new window. (opens a new window only if there isn't any other browser window)
    Here is the snippet of code that I am using to do this:
    String WIN_PATH = "rundll32";
    String WIN_FLAG = "url.dll,FileProtocolHandler";
    String url = "http://www.cnn.com";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    Process p = Runtime.getRuntime().exec(cmd);
    Thanks in advance.
    -Kishore

    >
    opening browser window seems to be easy task, >Even easier with [Desktop.browse(URI)|http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)].
    >
    ..can someone help me with closing browser window from java?>Which browser window?
    If you're app. opens a page that you control, it can be done from the web page. See [Have a Java button close the browser window|http://www.rgagnon.com/javadetails/java-0282.html] or the JS based [Close the browser|http://www.rgagnon.com/jsdetails/js-0079.html].
    If you do not control the page, don't close it - the user knows where the little 'x' button is.
    As an aside, despite being opposite ends of the one question, I do not consider this question to be 'part' of the current thread. I think you would have been better off starting a dedicated thread and explaining more fully what the use case is (and adding lots of Dukes).

  • Is there a keyboard shortcut to open the presently open web page in another tab? It used to be Ctrl + N.

    Is there a keyboard shortcut to open the presently open web page in another tab? It used to be Ctrl + N. This shortcut now opens a Tab with the home page instead of duplicating the web page I'm on.

    Firefox has always opened new tabs in a blank page, so I'm guessing that the way you had it before was added by an extension.
    If you to to Tools > Add-ons > Extensions, are there any extensions disabled?
    In any case, you can still do this with a mouse shortcut. Hold down the Ctrl key as you drag a tab to an empty area on the tab bar.

  • Using Runtime exec() to open java on other directory

    HI, I have a little problem and i hope everyone can help me out abit. You see when u use Runtime.exec(), how to you use it so that when the file you want to open is different from your program directory.
    For example,
    my program is in c:\windows\desktop
    but the file i want to open eg. Somthing.class is in c:\my documents\
    How do I open it using java and i wish to open the file using the java command. Thank a million

    Runtime.getRuntime().exec("cmd /c start /d\"C:\\my documents\" java.exe Somthing");
    Can someone explain the /c start /d\"C:\Mydocuments\" java.exe Somthing.
    And I try to use ping in RunTime.exec,how do I construct the string?And how do i get the result of the ping?
    Thanks

  • I want to buy MBA 11'' which model is good.  i.e.  i need speed.  I am using Lenovo netbook s-10. Is very slow in opening web pages an also in operating other apps.

    I want to buy MBA 11'' which model is good.  i.e.  i need speed.  I am using Lenovo netbook s-10. Is very slow in opening web pages an also in operating other apps.

    Put your first emphasis on memory. Don't even consider 2 GB.
    Second, maximize your SSD size according to the ability of your wallet. Lastly is your processor.
    For what you describe the MBA is plenty fast.

  • When I select print from any website article while in Firefox it only prints a blank page. When I open same web pages using Safari, they print fine. Documents in other appliations print fine. Only Firefox documents print blank page.

    When I select print from any website article while in Firefox it only prints a blank page. When I open same web pages using Safari, they print fine. Documents in other appliations print fine. Only Firefox documents print blank page.

    Quit Safari.
    Open the Library folder in your home folder as follows:
    ☞ If running Mac OS X 10.7 or later, hold down the option key and select Go ▹ Library from the Finder menu bar.
    ☞ If running an older version of Mac OS X, select Go ▹ Go to Folder… from the Finder menu bar and enter “~/Library” (without the quotes) in the text box that opens.
    Delete the following items from the Library folder:
    Caches/com.apple.Safari/Cache.db
    Preferences/com.apple.quicktime.plugin.preferences.plist
    Preferences/QuickTime Preferences
    Relaunch Safari and test.

  • Opening Web Pages

    Hello,
    I'm currently trying to open a web page within a browser. Currently I can only open a web browser with the web page. Here is the code.
    public class MyApp2
    private static final String errMsg = "Error attempting to open web page";
        public static void contURL() {
            String url= "http://www.google.com";
            String osName = System.getProperty("os.name");
            Runtime rt = Runtime.getRuntime();
            try{
                   if (osName.startsWith("Windows")) {
                                // this doesn't support showing urls in the form of "page.html#nameLink"
                        rt.exec( "rundll32 url.dll,FileProtocolHandler " + url);     }
                   else if (osName.startsWith("Mac OS")) {
                            rt.exec( "open " + url);    
                   else {
                            // Do a best guess on unix until we get a platform independent way
                                // Build a list of browsers to try, in this order.
                                String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
                                        "netscape","opera","links","lynx"};
         // Build a command string which looks like "browser1 "url" || browser2 "url" ||..."
                                StringBuffer cmd = new StringBuffer();
                                for (int i=0; i<browsers.length; i++)
                                    cmd.append( (i==0  ? "" : " || " ) + browsers[i] +" \"" + url + "\" ");
                                rt.exec(new String[] { "sh", "-c", cmd.toString() });
                        }catch (Exception e){
                              JOptionPane.showMessageDialog(null, errMsg + ":\n" + e.getLocalizedMessage());
    }Works well to open browsers (though it is opening in tabs and not new windows, could use some help in that too), I want to take an already open browser and open a new page leaving behind the the page currently on.
    Edited by: DarkGhost89 on Jan 12, 2008 9:14 PM

    I'd suggest reading the browser help pages for their command line arguments (if such documentation exists; generally this area of browser documentation is poor) and see if the browsers in question allow you to specify a target argument on the command line, in addition to the URL. I mean target as in the attribute to HTML links. (e.g., ). If such an argument exists, it might be different on each browser, which means you'll need to need to break up the non-Windows cases into many different cases. You might want to use "which" on unix boxes to find out which browsers are available.
    This is just a reasonable guess. I have no idea whether "target" is supported like this by any browser.

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • TS3276 i am unable to open web pages from email links on my ipad

    I am unable to open web pages from email links on my ipad

    A few more details might help, if nobody else recognizes this.   
    What happens when you try to open the links?
    Can you post an example of a link that doesn't work?
    Is there any particular source for the mail with the (bad) links, or is mail from all sources failing?
    If you happen to know it, what's the format of the mail message?  (Maybe the message is an image?)
    Do the embedded links work as expected from an OS X system running Mail.app, or some system and some other other mail client?
    To view the link in iOS: if you press on and hold your finger on an embedded link in most contexts, iOS will show a pop-up with the link contents, and will offer to copy it.  You can use that to acquire and post the link.  If pressing and holding on the link doesn't offer the pop-up, the format of the link itself may not be valid, or it might not really be a link.

  • Need help to access a web page using midlet to retrieve some informations

    Hi everyone i'm trying to access a web page using midlet to retrieve some informations in text format, the web page is [http://daviddurand.info/D228/?villes|http://daviddurand.info/D228/?villes] for my project.
    the problem is that i always get error 10049 in socket::open meaning no adresse could be found i tried IP adresse and still the same.
    i managed to recreate the same web page to test it on local and the surprise that it works fine but when accessing it online i have this error.
    i tried also to get the page i created on a webserver i own to try it saying that there might be security issues but the same error appears again. so help plz
    here is my code :
    package mobileapplication5;
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class GetMidlet extends MIDlet {
    private Display display;
    String url = "http://dayaati.com/villes/index.php?villes";
    public GetMidlet() {
    display = Display.getDisplay(this);
    public void startApp() {
    try {
    getBirthdayFromNameUsingGet(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    public void pauseApp() {   }
    public void destroyApp(boolean unconditional) {  }
    public void getBirthdayFromNameUsingGet(String url) throws IOException {
              HttpConnection httpConn = null;
              InputStream is = null;
              OutputStream os = null;
              try {
    httpConn = (HttpConnection)Connector.open(url);
    httpConn.setRequestProperty("User-Agent", "Profile/MIDP-2.1 Configuration/CLDC-1.1");
    httpConn.setRequestProperty("Content-Language", "en-US" );
    httpConn.setRequestProperty("Content-Type", "text/html; charset=iso-8859-1");
    httpConn.setRequestProperty( "Connection", "keep-alive" );
    httpConn.setRequestProperty("Content-Length","51200");
              getConnectionInformation(httpConn);
              int respCode = httpConn.getResponseCode();
              if (respCode == httpConn.HTTP_OK) {
                   StringBuffer sb = new StringBuffer();
                   os = httpConn.openOutputStream();
                   is = httpConn.openDataInputStream();
                   int chr;
                   while ((chr = is.read()) != -1)
                   sb.append((char) chr);
                   // Web Server just returns the birthday in mm/dd/yy format.
                   System.out.println(sb.toString());
              else {
                   System.out.println("Error in opening HTTP Connection. Error#" + respCode);
              } finally {
                   if(is!= null)
                   is.close();
                   if(os != null)
                        os.close();
              if(httpConn != null)
                        httpConn.close();
    void getConnectionInformation(HttpConnection hc) {
    System.out.println("Request Method for this connection is " + hc.getRequestMethod());
    System.out.println("URL in this connection is " + hc.getURL());
    System.out.println("Protocol for this connection is " + hc.getProtocol());
    System.out.println("This object is connected to " + hc.getHost() + " host");
    System.out.println("HTTP Port in use is " + hc.getPort());
    System.out.println("Query parameter in this request are " + hc.getQuery());
    **Heeeeeeelp Please**

    [http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html]
    SIGSEGV (0xb)Most common cause of that is JNI code used directly or indirectly through a 3rd party library.
    64-Bit Server VM (11.2-b01 mixed mode linux-amd64)Conversely that VM gets less traffic than others so you might have hit a bug in it.

  • I'm not able to access the thumbnails of my open web pages. Why?

    I'm not able to access the thumbnails of my open web pages. Why?

    Oh ok, that explains it. Thank you so much. I'm still getting use to my ipad2. I've only had it for about three weeks

  • IS THERE ANYONE LEGITIMATE THAT KNOWS WHY I CAN CONNECT TO INTERNET WITH A IBOOK G3 AND NOT OPEN WEB PAGES?  ONLY HAPPENS WITH MY LANDLORDS ROUTER THAT HE HAS PROVIDED THE PASSOWRD FOR. ONLY WAY I CAN CONNECT TO HIS SERVICE IS IF HE HAS FIREWALL DOWN. WE

    PLEASE ONLY RESPOND IF YOU KNOW HOW TO CORRECT THE PROBLEM. I'M CONNECTED TO MY LANDLORDS INTERNET VIA AN EXT NETGEAR ROUTER, PASSWORD PROTECTED, THAT HE HAS PROVIDED WITH A G3 IBOOK. FULL SINGAL, CAN'T OPEN WEB PAGES. HAS NEVER HAPPENED BEFORE.

    That's because your landlord probably is using WPA2 encryption or 802.11g or 802.11n wireless.  The iBook G3 lacks support for WPA2 encryption, which is much stronger than WEP and the original WPA.   It also only has support for 802.11b.     If you want to join a newer router with a secure firewall, get an 802.11g or better wireless ethernet bridge.
    P.S. Please avoid from using all UPPERCASE.     It is hard to read, and in internet etiquette it means you are attempting to shout and be rude.  I'm sure that was not your intent.  So please avoid from doing that again.  Thank you.
    P.P.S.  10.7.1 can't run on an iBook.   Are you sure you have an iBook and 10.7.1 is on it?  If it doesn't say iBook on your screen frame, or Apple menu -> About This Mac doesn't say Mac OS X 10.7.1, it is not 10.7.1, or an iBook.    MacBooks, which replaced iBooks in 2006, and later came out with Core2Duo and Core i processors, are the only Apple notebooks that can run 10.7.1.

  • Adobe Reader 9.2 not opening web pages in Win7 64bit

    After reading all the threads on this subject, it seems that two things are obvious: Adobe has a lot of trouble with their software fixes, and secondly, the fixes seem to be different for many PC's and OS's. I have windows 7 Ultimate, 64 bit, and Adobe reader 9.2 is hanging when we try to open web pages with .pdf files. We are using IE8 ( even Firefox with foxit is having a heart attack ! ) I am trying to uninstall version 9.2 with no success. It gets to one part of the uninstall and then gives me a message that other programs are using Reader, and it stops the uninstall. I have tried REPAIR, it does not help. Am I to assume that Adobe AIR and Adobe.com ALSO need to be uninstalled PRIOR to attempting to uninstall Reader 9.2?
    Also, I feel that the present install of 9.2 is corrupted ( hence why I am trying to reload ) because when I open the Adobe Reader icon on the desktop, the black Adobe screen opens, but after about 6 seconds the Adobe screen goes white and there is a message in the top Adobe Reader bar stating that the program is not responding. ( Obviously something is missing in the install ) MS  UAC is set to OFF, so no security blocks there.
    Q1 : How do I get Adobe Reader ver 9.2 to uninstall?
    Q2: Will version 9.2 of Adobe Reader work on Windows 7 64 bit presently?
    Thank you in advance for any kind assistance

    To uninstall Adobe Reader, make sure (using Task Manager's Processes tab) that Adobe Reader is not running.  Browser windows should also be closed.
    If you still cannot proceed, try in Safe Mode, or use the Windows Installer CleanUp Utility.
    P.S. Adobe AIR and Acrobat.com are not directly related to Adobe Reader, and can be uninstalled independently.

Maybe you are looking for

  • Where are the drivers for micro ph

    my micro photo wont install on my computer says no drivers found the sofware is installed.if i could find the drivers on the disc maybe it would be quicker to locate the drivers i have been at this for 2 weeks

  • New intel mac show old name

    The name of my Mac is still being showen as "Tom Reed's G5" in my profiler. I changed the name a week ago to reflect the new computer. It was right for a few days. I just noticed it went back to the older name. Can I fix this somehow?

  • App store apple id disabled

    I have changed my apple id password a dozen times and it gets me into my account and even here in the community page, but every time I try to use it in the App Store, it says apple id disabled.  How do it fix it? eraf

  • Desktop/Screen Saver panel missing in System Preferences

    Hello, I recently had to have my hard drive changed and I reloaded OSX 10.6.8 back on it along with the applications DVD.  Now when I go to the system preferences, the DESKTOP/SCREEN SAVER panel is no longer listed.  I am very new to my Imac and trie

  • Cloning Hard drives

    What is the best program for cloning my hard drive. If I use disk utility, I'll have to re-install the entire CS2 Suite. After I figure out how to totally uninstall it? I intend to go to a larger drive. Jeff