Results 1 to 2 of 2
  1. #1
    nPwn is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default How to refresh a page using java?

    I have figured out how to start a page:
    Java Code:
     public static void displayURL(String url, int buyingprice)
            boolean windows = isWindowsPlatform();
            String cmd = null;
                if (windows)
                  cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
                    Process p = Runtime.getRuntime().exec(cmd);
            catch(IOException x)
               System.err.println("Could not invoke browser, command=" + cmd);
               System.err.println("Caught: " + x);
      public static boolean isWindowsPlatform()
            String os = System.getProperty("");
            if ( os != null && os.startsWith(WIN_ID))
                return true;
                return false;
    But how can I now refresh that page?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: How to refresh a page using java?

    Where is the page being displayed?
    Is there an API that you can call to ask the page displayer to refresh the page?

    It looks like the page being displayed by another independent application.
    The Robot class would be able to move the cursor and press it anywhere on the screen.

Similar Threads

  1. Auto Refresh a Java Popup Page?
    By lokerd in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-07-2011, 07:46 PM
  2. Web page refresh
    By Araganaus in forum New To Java
    Replies: 1
    Last Post: 09-03-2009, 09:06 PM
  3. warning that page has expired and i need to refresh the page again
    By 82rathi.angara in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 07-15-2008, 02:48 PM
  4. Refresh the page
    By udhayageetha in forum AWT / Swing
    Replies: 2
    Last Post: 07-01-2008, 10:03 AM
  5. How to Refresh the same page by JSP
    By AbuAziz in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 12-10-2007, 05:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts