Waw! One day, thinking one another, comes up another thing.
Well, surely. I am a Windows User here. I wonder if we could run the Internet Explorer
via Java. After awhile I think, and think, again... i re-think.
I found out that we can execute the "iexplore" using CommandLine via java.
And that one using Runtime object.
But, before that, We need to follow up this algorithm below;
(ensuring the IE directory is set under PATH variable).
1) Regedit Checking
Check to the Location of "HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Environment"
IF there's a Variable named, "Path", with value of "Internet Explorer".
Then ... We can run the IE.
... we need to find out the IE Location... (Geezz).
and then Set the IE Location into previous Path.
2) Find Out IE Location....
Go to the Root location,
Obtain each Folders.
Check its name whether matched with Internet Explorer.
If no, then keep iterating... (Geeezz)
But is there any shorter way rather than those stated above?
Is there a requirement to run Internet Explorer specifically, or do you just want to display a webpage in the user's preferred web browser (which might be something else than Internet Explorer)? The best way to launch the user's preferred web browser is by using the Desktop class:
I guess James said "too late" because I already answered with more or less the same answer...
Ok, if you specifically want to run Internet Explorer, then you need to do more complicated things. But I don't understand why you insist on running IE especially; users might not like it when you run IE instead of their preferred browser. Also, your code is Windows-only; using the Desktop class works on all operating systems.
J. Insi wrote:because, at this moment,
we're just user of IE.
even thought, the Firefox is used as Default Browser here.
One of the things I have learned over the years is that one's choice of browser has a strong religious aspect. If you try to force someone to use IE or Opera or Firefox or Chrome when they prefer to use a different browser then your users will not get a warm feeling from using your system. Every place I have worked where a browser was involved we have gone to great pains to make sure that we covered the use of all the major browsers going back at least one major version. Not always easy especially with IE but well worth the effort.
P.S. my "Too late" comment was, as surmised, added because in the time it took me to find the URL the question had been answered.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
What a show! What atmosphere! What fun! What a tiny ad!