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.
Related Tutorials/Questions & Answers:
Trouble in running Dos Command from Java ServletTrouble 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 lineCompiling and
Running Java program
from command line - Video tutorial... of compiling and
running java
program
from command line. We have also video... to explain you the process of
compiling and
running the
Java program
from command Advertisements
Running R script from command lineSteps of
running R script
from command line
In the previous tutorial we...
the script
from command prompt without GUI.
Here are the need of
running R... will create a file for R script and then run
this script
from command line
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 tree map troubleJava 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 BeginnersHow 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 lineJava 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 a Dos Window? - Java BeginnersHow 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
ping command in servletping
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
Java I/O From the Command LineJava 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 DOS ATTACKDOS ATTACK
JAVA CODE FOR MONITORING AND PREVENTION OF
DOS ATTACK
Running threads in servlet only once - JSP-ServletRunning 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
How To Read String From Command Line In JavaHow 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
Calling servlet from servlet .Calling
servlet from servlet . How to call a
servlet from another
servlet in
Java?
You can call another
servlet by using... ServletException, IOException {
System.out.println("Calling another
servlet by using
exception in thread main while running servletexception in thread main while
running servlet I got exception in thread main no such method error while
running servlet. I have added...\Tomcat 6.0\lib\
servlet-api.jar;C:\Program Files\Apache Software Foundation
Redirect from servlet to servletRedirect
from servlet to servlet I want to insert data
from Text box... to redirectServlet , and
from this
servlet I want to again forward my page to insertServlet(i.e...;
<
servlet-name>redirectServlet</
servlet-name>
<
servlet