jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes run exe from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "run exe from servlet" Watch "run exe from servlet" New topic

run exe from servlet

kodali s

Joined: May 31, 2001
Posts: 3
I have this code in my java testclass.
Runtime rt = Runtime.getRuntime();
If I run this class file in Command prompt it is opening notepad.exe but the problem is if i copy same code into my servlet it is not openning notepad.exe. Even if i take an instance of my class in the servlet still it is not calling notpad.exe and it is not giving any error.
Can anybody help me.
Thanks in advance.
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
Hello ,
I tried ur code and it works fine on my machine. As my times I click on the refresh window, those many notepad applications are opening .
Anyway , Just wanted to tell u that In servlet making use of Runtime classes will open the apl;ication or execute the application on the server and not the client side .

Try and Try Till u succeed
Sandeep Jain

Try and Try Till u succeed<br /> <br />Sandeep Jain
kodali s

Joined: May 31, 2001
Posts: 3
If I want to run an application in client machine what should I do. I am using java, jsp, and servlets.

[This message has been edited by kodali s (edited May 31, 2001).]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
"kodali s",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link: http://aspose.com/file-tools
subject: run exe from servlet
jQuery in Action, 3rd edition