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

 
 


Sid
Trouble in running Dos Command from Java Servlet
0 Answer(s)      a year and 2 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

View Answers









Related Pages:
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
Summary: DOS Commands
and executing Java programs from DOS prompt. Before Windows, there was the ugly... utilities that can be run from the DOS command line. APPLETVIEWER fRuns...Java Summary: DOS Commands In this section we will discuss about DOS commands
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 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
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
J2EE Tutorial - Running RMI Example
;This command compiles the servlet.    The following html file... J2EE Tutorial - Running RMI Example    ...? 1) We require jndi package for running this program.  
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
ALL command - SQL
ALL Command in Java & SQL  Nee all commands in Java.  Dear Manoj, I didn't get u what do u mean by all command. could u please... is a command line program to run Java applets. It is included in the SDK
Running JUnit
Running JUnit  Hi sir How can we run JUnit or Run test case Using JUnit using command prompt or CMD? Is there any alternate way of running test cases?   ou can run JUnit test case by running following command on CMD
Running JUnit
Running JUnit  Hi sir How can we run JUnit or Run test case Using JUnit using command prompt or CMD? Is there any alternate way of running test... command on CMD : java org.junit.runner.JUnitCore <Your Test Class Name>
Command line arguments
Java application can accept any number of arguments directly from the command line. The user can enter command-line arguments when invoking the application. When running the java program from java command, the arguments are provided
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
Trouble with array manipulation
Trouble with array manipulation  For this project I have to print 10 random numbers from (0-99), print the max value, the average of the ten numbers... 16 14 68 80 23 This is the code i attempted, but i am having trouble putting
Running Batch files in java - Java Beginners
and every line from the batch file and execute it line by line in java. Is anyone... are sending you some sample program code for running batch (.bat) file in Java. We have used "exec()" command for running the batch file. Suppose we have created
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   
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
error while running the applet - Java Beginners
error while running the applet  import java.applet.Applet; import...); ++num; } } } } i have problem while running the code , error in command prompt says unable to find class Frametest.class there are three
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
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
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
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
command prompt is compilation is not working
command prompt is compilation is not working   Dear java users can anyone help me to run the program in command line prompt i tried by selecting... is compiling and generation the class file using javac c:\helloworld.java command
Installation, Configuration and running Servlets
for running this server is Sun?s JDK (Java Development Kit) and JRE (Java Runtime...\jdk1.6.0). You can either set this from the command prompt or from My Computer... is no different from that of writing and compiling a java program. But, the point
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
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
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
About running the Tomcat Server
About running the Tomcat Server   HI I want to run a simple program on servlet and the application is a simple program Hello world to print on Internet browser. And the directory for servlet is like
Running and deploying Tomcat Server
Running and deploying Tomcat Server  HI Somebody has given... described below I want to run a simple program on servlet and the application... for servlet is like this Apache Software Foundation/Tomcat 5.0/webapps/ i created
command line arguments - Java Beginners
at the command prompt and then calculate the max and min numbers from them...command line arguments  how can i findout the minimum and maximum no's at the command prompt if i give some values?????????  hi friend
applet running but no display - Applet
applet running but no display  Hai, Thanks for the post. I have... from a client, the page appears with a blank applet part (just whitescreen... strDefault = "Hello! Java Applet."; public void paint(Graphics g) { String
Running the Test Plan
Running the Test Plan      .... To indicate that the test is running a green square lits up in the upper-right.... The green square will change to grey Once JMeter  finishes running your
Console Output
Java NotesConsole Output You can write programs that write text lines to the "console", which is typically a DOS command window.... println comes from Pascal and is short for "print line". There is also
Running and testing the example
Running And Testing The Example Before running the application, you will have... from http://ant.apache.org/bindownload.cgi and set the the environment variable path of the ant like this. then open your command prompt ant type ant
How to Checking Syntax Error in PHP from Command Line
How to Checking Syntax Error in PHP from Command Line  Checking Syntax Error in PHP from Command Line   PHP allows you to check your script syntax without running the code. Just use the â?? l switch with php command
Group Discussion Dos and Don’ts
Group Discussion Dos and Don’ts       Introduction Group discussions are today an important... easy task to stand out from a group of ten to twenty candidates. You are being
Java Break command
Java Break command       Java Break command is commonly used in terminating looping statements. break command comes under the Java branching statements category. In programming
Outsourcing Troubles, Troubles With Outsourcing, Trouble in Outsourcing
’t unanimous about the exact rate (could be anything from 40 to 70 percent). The Causes The specific reasons vary from case... to be successful and mutually rewarding. From the client’s side
error of HTTP Status 404 while running servlet on apache tomcat server
error of HTTP Status 404 while running servlet on apache tomcat server  i have followed the steps given here.Also hava put servlet-api in lib folder... the apache tomcat page. It mean that my tomcat server is up and running. but whn i
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
Java : Servlet Tutorials - Page 2
Java : Servlet Tutorials     ... data from this .java file..    Export data... to a servlet.   Quick Introduction to Java Servlets
Passing argument at command line using Core Java
How to pass Command Line Argument using Core Java Description : This example demonstrate how value accepted from the command line. All argument need to placed at the command line at the time of executing your program.  class
Send Email From JSP & Servlet
J2EE Tutorial - Send Email From JSP & Servlet... (java servlet development kit).  (We are using Tomcat server. ... file. It is automatically compiled at the server. For running a servlet
How To Read Integer From Command Line In Java
How To Read Integer From Command Line In Java In this section we will discuss about how an integer can be read through the command line. In Java all... value from the command line. In this example I have created a class named
iperf command in java
iperf command in java  How to write a code for iperf command in java
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
Command Line Standard Input In Java
Command Line Standard Input In Java In this section we will discuss about the Java IO Standard Input through Command Line. Standard streams, feature... the command line interpreter. Java provides System.in to access the Standard Input

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.