Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Trouble in running Dos Command from Java Servlet
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Sid
Trouble in running Dos Command from Java Servlet
0 Answer(s)      2 years and 6 months ago
Posted in : Java Beginners


Hello All, I have to run following command from Java. The command is : vscanwin32 /S C:\Test > C:Scan_Result.txt

vscanwin32 is resided at location: C:\Program Files\Trend Micro\OfficeScan Client

I have tried this : String dosCommand = "C:\Program Files\Trend Micro\OfficeScan Client "; String dosCommand2 = "vscanwin32 /S C:\FileListing"; Runtime.getRuntime().exec("cmd /c dir");

I gets error as: java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2, The system cannnot find the specified file.

The above line of codes are in one servlet and from servlet I wants to run specified DOS Command. Can anyone help me out here ? I have tried googling too. But the googling results are very limited to commands like 'cmd /c dir /s'.

Looking forward for the help.

-Java Beginner


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Trouble in running Dos Command from Java Servlet
Trouble in running Dos Command from Java Servlet  Hello All, I have to run following command from Java. The command is : vscanwin32 /S C:\Test > C... servlet I wants to run specified DOS Command. Can anyone help me out here ? I
Compiling and Running Java program from command line
Compiling and Running Java program from command line - Video tutorial... of compiling and running java program from command line. We have also video... the process of compiling and running the Java program from command prompt
Advertisements
Java tree map trouble
Java tree map trouble  This is a project for a class, and I am totally stuck! I've created a tree map using an input text file. I split the lines into fields so that I could work with 2 elements from the file. It appears
How to clear Dos screen in java? - Java Beginners
How to clear Dos screen in java?  How to clear Dos screen in java? Is there any way to clear the dos screen in windows platform just like "cls... having the DOS command like "clr". Now you can call that particular batch file
Java memory options from command line
Java memory options from command line  Hi, How to use java memory options from command line? Thanks   Hi, Here is the example code: java -Xms1056m -Xmx1056m MyProgram Thanks
How to clear dos screen just like cls in dos - Java Beginners
How to clear dos screen just like cls in dos  You said we have to write bat bile. so every time i have to call that file in my java program am i... answer  Hi Friend, Put the 'cls' command in your batch file(ab.bat) and call
How to clear Dos screen in java? - Java Beginners
How to clear Dos screen in java?  How to clear Dos screen in java? Is there any way to clear the dos screen in windows platform just like "cls" in dos and clrscr in c
how to clear dos screen in java - Java Beginners
how to clear dos screen in java   how to clear dos screen in java
How to clear a Dos Window? - Java Beginners
How to clear a Dos Window?  problem with the following code: This code is opening another dos window.Is it possible to close the first dos window without exiting from the second window...I don't want to open two windows...how
Java I/O From the Command Line
Java I/O From the Command Line In this section we will learn about the I/O from the command line in Java. Several times you can see that the programs runs after taking the input from the command line. Java also supports for the command
How To Read String From Command Line In Java
How To Read String From Command Line In Java In this section we will discuss about how string can be read through the command line. In Java command line... giving from the command line. Command line arguments are passed
ping command in servlet
ping command in servlet  hi can we execute ping command in servlet like as we do in normal java. if we can please give an example how. thanks & regards
problem running a servlet on tomcat.
problem running a servlet on tomcat.  i have followed the steps given... suppose that should mean that my tomcat server is up and running. but whn i try to run my servlet that is placed in the directories as it has been mentioned here
java program for Denial of Service (DoS) attacks detection - Swing AWT
java program for Denial of Service (DoS) attacks detection  i want a simple program to generate and detect a Denial of Service (DoS) attacks. using java program
Command line argument in java
Command line argument in java. In this section we are going to discuss about command line argument in java. Command line argument allow a user to pass arguments at the time of running the application , after the class name. Java allow
running java with classpath in cygwin
running java with classpath in cygwin  The following command works in cmd.exe but failts in cygwin shell. java -cp .;oracle.jar;mysql.jar Executecmd query value; how should i alter the command to run in the bash shell?thanks
iperf command in java
iperf command in java  How to write a code for iperf command in java
How to run PHP Script from the command line ?
How to run PHP Script from the command line ?  Running PHP Script from the command line   Actually it is very simple to run php script... expect. You can also check : http://www.phpzag.com/running-php-script-from
Java Command Line Input
Java Command Line Input  How to get input from command line in java ?   Hi please Find the code for inputting data from the command line System.out.println("Please Input A Number"); BufferedReader br
Command Line Arguments in Java Program
directly from the command line. The user can enter command-line arguments when invoking the application. When running the java program from java command... Command Line Arguments in Java Program   
execute dos commands
execute dos commands  how to execute dos commands using a java program
i want to copy files from one machine to other using java and the code will be running on third machine
i want to copy files from one machine to other using java and the code will be running on third machine  i want to copy some files from one machine say 'A' to some other machine say 'B' by using the java program running on third
Running Java Applications as software
Running Java Applications as software   Please tell me what to do if you want your java application to run like a real software,eg a java GUI application that connects to the database(Mysql)running on the computer like any other
Repairing mysql database from command line
Repairing mysql database from command line  Hi, Can anyone tell me the process for repairing mysql database from command line? Thanks
How to invoke method of a library from command line
How to invoke method of a library from command line  Suppose there are two methods in a libray and you have to invoke one of the method from that library directly from the command prompt. How will you do
Running core java program
Running core java program  I am jayesh raval. I am going to make simplae program and at the time of runnint that program I found class not found exception. I have clear source of that program and that is right in the syntax. so
run command prompt from jsp program
run command prompt from jsp program  Hi.... Is it possible to run a command prompt from jsp? If possible please help me with some code... Thanks & Regards vanchinathan.R
Running threads in servlet only once - JSP-Servlet
Running threads in servlet only once  Hi All, I am developing a project with multiple threads which will run to check database continuously... process while mail thread is running. these two separate threads has to run
What is command line argument in Java
example of command line argument program in Java?? It will be really helpful... of arguments from the command line. Arguments are passed as a string array...What is command line argument in Java  What is command line argument
Java Not running - Java Beginners
Java Not running  Hi, I tried to create a grade(type array) and final_grade (type of String) program using getter/setter but not want a public setter method for final_grade; Here is my program that calcuate the average of all
How to Get currently running processes in a tabular form in java
me a static table as the cmds contains a dos command tasklist. thank you...How to Get currently running processes in a tabular form in java  I need to create a frame that shows all the current running processes in the system
Advertisements
 

 

 

DMCA.com