| Author |
how can we lauch browser from my application in solris ?
|
zainu Mehmood
Ranch Hand
Joined: May 09, 2007
Posts: 45
|
|
i use Runtime.getRuntime().exec("cmd /c start iexplorer http://www.sun.com"); it works fine for windows but what for solaris where netsacepe is insatalled ,please let me know
|
 |
Mirko Bonasorte
Ranch Hand
Joined: May 14, 2007
Posts: 244
|
|
|
You are off topic. However, you can use 'sh -c <command>', in this case.
|
SCJP<br />SCWCD 1.4 Upgrade (Remember: me stupid)<br />SCWCD 1.4<br /><a href="http://jcp.org/aboutJava/communityprocess/final/jsr220/index.html" target="_blank" rel="nofollow">SCBCD 5.0</a><br /><a href="http://www.enthuware.com" target="_blank" rel="nofollow">SCBCD 5.0 mock exam</a> <br /> <br />SCEA 5 Part1: Preparing...
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
Not in the scope of Sun Certified Java Programmer I think...
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
zainu Mehmood
Ranch Hand
Joined: May 09, 2007
Posts: 45
|
|
|
Thanks Mirko Bonasorte ,your one line has solved my problem
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
If you are using Java 6, you can and probably should use the new Desktop class. This has platform-independent pure Java browser launcher. If you are not using Java 6, then you can still do better on Windows. You should respect the user's chosen browser, not force them to use Internet Exploder. You can do that by running FileProtocolHandler. On Linux, you can use "htmlview". Might that work on Solaris? Again, has the advantage of respecting user's choice of browser. Note 1: RuntimeOptions is not a built-in class, it's mine. You can see what it does. Note 2: I've got Mac OS X code, too, but it's a bit more verbose, so I haven't included it here. [ May 16, 2007: Message edited by: Peter Chase ]
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
 |
|
|
subject: how can we lauch browser from my application in solris ?
|
|
|