how to run java file using javascript and batchscript -
i want run java file using javascript. therefore took of batch file. when tried following code giving, page cannot displayed... can please possible...
<html> <head> <script type="text/javascript"> function compression(str) { try{ alert("welcum"); wshshell = new activexobject("wscript.shell"); wshshell.run (str,1,true);} catch(e) { document.write("erro has occured "); } } </script> </head> <body> <a href="compression('explorer file:///c:\\documents , settings\\test.bat')">batch file</a> </body> </html> --------test.bat file------ @echo off cls javac *.java java lzwtut pause
can try following
<a href="compression('file://c:/test.bat');">batch file</a>
also can try exec insted of run in compression function?
Comments
Post a Comment