Results 1 to 7 of 7
  1. #1
    stempel1984 is offline Member
    Join Date
    Jun 2010
    Location
    Lodz, Poland
    Posts
    3
    Rep Power
    0

    Default How to check whether a default browser is opened in the operating system?

    Hi,

    I am newbie here. During my work, I faced an interesting problem. I need to:
    - check whether a default html browser is opened;
    - check whether the browser is minimized/maximized (simply, a window's state);
    - get an url address typed in the browser.
    If any of these conditions is not met, I have to open the browser in a maximized view with a desired url address. I primarily wanted to do all this in Java, but it came to my mind that I should employ many techniques/technologies and combine them appropriately to complete the functionality. But, which ones? That's the problem. I just recalled Windows API, but I'm not sure if it is of any help... I know how to open a default browser (e.g. with use of the 'browse(URI uri)' method of the 'java.awt.Desktop' class). Please give me some hints, maybe links to reasonable discussions, I would greatly appreciate any suggestions how to approach the problem.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,616
    Rep Power
    25

    Default

    Sounds like a job for JNI. Your requirements are very much into specific OS stuff: Determining the default browser and whether its open and whether its window is max/min.

  3. #3
    stempel1984 is offline Member
    Join Date
    Jun 2010
    Location
    Lodz, Poland
    Posts
    3
    Rep Power
    0

    Default

    Hmm, I haven't much experience with Java Native Interface (JNI?). To be honest, no experience at all... Could you give me any example code of this (simple application or something)?

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    answer removed.
    Last edited by PhHein; 06-07-2010 at 04:25 PM.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

  6. #6
    stempel1984 is offline Member
    Join Date
    Jun 2010
    Location
    Lodz, Poland
    Posts
    3
    Rep Power
    0

    Default

    What do you mean? These are not the same fora...

  7. #7
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

Similar Threads

  1. Main Operating System
    By Mr.Beans in forum Forum Lobby
    Replies: 52
    Last Post: 08-29-2011, 07:13 AM
  2. how to check the window has already opened
    By javastuden in forum AWT / Swing
    Replies: 3
    Last Post: 01-29-2010, 08:26 AM
  3. Operating System detection of client
    By jsfgeeks in forum Advanced Java
    Replies: 6
    Last Post: 11-27-2008, 08:38 AM
  4. finding Operating System specific data
    By FrankyDee in forum New To Java
    Replies: 2
    Last Post: 09-28-2007, 04:27 PM
  5. Tracking Operating System
    By Mansi in forum Networking
    Replies: 2
    Last Post: 07-23-2007, 02:41 PM

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
  •