CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2011
    Posts
    9

    Openning URL in new window

    Hi,

    When i type firefox -new-window http://google.com command on linux terminal, it opens google.com in new window in firefox (even if firefox is already opened).

    When i execute this command in java program using :

    Process p = rt.exec(new String[] {"firefox", "http://www.google.com"});
    p.waitFor();

    it runs properly. but, when i change it slightly:

    Process p = rt.exec(new String[] {"firefox", " -new-window", "http://www.google.com"});
    p.waitFor();

    it's no more blocking call. what's wrong with it and how can i fix it?

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Openning URL in new window

    Have you tried removing the leading space from the new window parameter, i.e. "-new-window" ?

    If you're not failing every now and again, it's a sign you're not doing anything very innovative...
    W. Allen
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Apr 2011
    Posts
    9

    Re: Openning URL in new window

    Yes, i tried that also. It doesn't work too.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured