FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


JAVA Runtime.getRuntime().exec("HELP");





kawkazEE
i have a button inside a form and when i clicked the button i want to open my pdf file. i went googling and it says something about the Runtime.getRuntime().exec(); how do i use this to run my pdf file? please help.... Confused
roguehider
maybe you should try sth like this. I haven't tested it, I hope it works.

(in Windows)

Code:
Runtime.getRuntime().exec(new String[]{"rundll32", "url.dll,FileProtocolHandler", "file.pdf" });

(in Unix)
Code:
Runtime.getRuntime().exec(new String[]{"acroread", "file.pdf" });
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.