pcouas said:
Hi,
Could i launch browser with command
Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler
"+filePath) without launching new Browser, but in same Browser ???
I don't use ShowDocument, because Tomcat webserver launch PDF on local
PC file://D:/toto.pdf
There's a good Javatip for this at
http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
It says that it will open the document in the default browser without having
to open a new window, as does this discussion
http://www.codecomments.com/archive256-2004-7-235674.html . However, I
found that even when I set the IE Tools /Internet Options/Advanced/Reuse
shortcuts flag, file-based URLs would continue to open in new windows
whereas http:-based URLs would reuse a window. This is really a Windows
issue rather than a Java issue. This site lists rundll options, but there
aren't any for window control like _blank.
http://www.ericphelps.com/batch/rundll/ There are other sites out there that
have more complex details, try googling on rundll32 fileprotocolhandler
In any case, you ask about using this in preference to showDocument, which I
normally think of as an applet request. The exec method will not work from
an applet unless you sign the applet and have the user grant permission.
Cheers,
Matt Humphrey (e-mail address removed)
http://www.iviz.com/