This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "run exe from servlet" Watch "run exe from servlet" New topic
Author

run exe from servlet

kodali s
Greenhorn

Joined: May 31, 2001
Posts: 3
I have this code in my java testclass.
Runtime rt = Runtime.getRuntime();
rt.exec("C:/winnt/system32/notepad.exe");
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
Greenhorn

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

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

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.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: run exe from servlet
 
Similar Threads
run exe in client sid
launching Notepad From Servlet
run exe
running another application from java
problem while launching notepad from servlet