Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Java and Browser

  Asked By: Kuhaylah    Date: Jul 28    Category: Java    Views: 672
  

I have very tricky question. I dont know if thats possible. I want
to write a java program which tells me how many browser window i am
running. Is that possible. I try using java properties API but this
is not helpful.

If anyone have any idea would be very helpful.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Dinh Tran     Answered On: Jul 28

well you need to interface the windows api. what if the user is running
unix? what then, will it still count the windows? i doubt it. perhaps
your solution would be in the from of C. i suggest you use C, but even
then its not ideal. you could try using JNI, but then you will have
written something close to C++, so why not write  a client program  in
c++?

sorry about wordy reply, javascript could possibly count the browser
windows, why do you need this? are you trying to see if a user has a
window already open?

 
Answer #2    Answered By: Ann Evans     Answered On: Jul 28

>are you trying to see if a user has a window  already open?
Yes, Basically,when user open the new window from existing window,
then I want to handle of that window.

C++
right now I have program  that use javascript and java  both
thogether. Java baseically is a controller so i can use i/o and
write to a file. Because javascript is not capable to write  into a
file.

The main thing is this program is a web based program..

 
Answer #3    Answered By: Dan Romero     Answered On: Jul 28

why are you writing such a fragile system that needs to know the number
of client windows? i do not think your system requires this. re think
the way you have developed things and sort out where your weakness is
that the number of client windows is important then redesign.

sorry, but java  was not developed for this purpose. if the client
windows is important, then perhaps you should write  in c++ so that you
can restrict the number of open client programs through use of the
windows api.

 
Answer #4    Answered By: Clint Garcia     Answered On: Jul 28

total browser  windows or only for a specific client?
for a specific client, u can put a counter in the session object.
for total browser windows, u can count the sessionIDs used, one client may
have more than one windows with the same session ID, but this is not the
normal behavior...

 
Didn't find what you were looking for? Find more on Java and Browser Or get search suggestion and latest updates.




Tagged: