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

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -