Hello All, Can a servlet run an EXE which is located on another machine.
Raghavendra Holla
Ranch Hand
Joined: Jun 02, 2000
Posts: 58
posted
0
Hi, What you have to do with exe? Is it any third party software? Objective of Java to make it poratble across the plaforms.. i.e. "Write once .. Run anywhere..." However still you want to use.. use following method, Runtime.getRuntime().exec("C:\win\system\notepad.exe");
Try to avoid using above command. look into java.lang package for further information. regards, holla.
Bharatesh H Kakamari
Ranch Hand
Joined: Nov 09, 2000
Posts: 198
posted
0
You cannot execute a file on a remote machine (Machine 1) by a servlet on machine 2.
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
However, a servlet can call an executable program in the same way as any other Java code. You need the Runtime.exec() method. Look it up in your API documentation.