Results 1 to 5 of 5
Thread: Null value
- 06-11-2008, 11:48 AM #1
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
Null value
Hi everybody,
I want to display the results of avgscan.exe c:\Foldername
using java code
The following is my code snippet. I got a value null
Can anybody help me ?
Runtime run = Runtime.getRuntime();
Process pp=run.exec("C:\\Program Files\\Grisoft\\AVG Free\\avgscan c:\\VirusScan");
BufferedReader in =new BufferedReader(new InputStreamReader(pp.getInputStream()));
System.out.println(in.readLine());
- 06-11-2008, 11:52 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Please don't ask your questions on existing thread, if it is not related to you. Next time start a new thread in such a case. Don't do it this time. I'll move this thread to correct place. :)
- 06-11-2008, 12:08 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Why are you try to execute two process at once. Remove one and try it.
- 06-14-2008, 01:17 AM #4
Member
- Join Date
- Jun 2008
- Posts
- 22
- Rep Power
- 0
To give arguments you have to do it in the following way:
String[] cmd = {
"C:\\Program Files\\Grisoft\\AVG Free\\avgscan", // Command
"c:\\VirusScan" // Argument
};
Process pp=run.exec(cmd);
Try it,
Ferran
- 06-15-2008, 06:25 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yes, it's true. But he's looking to start an application using Java code.
Similar Threads
-
Null pointer Exception
By peiceonly in forum New To JavaReplies: 8Last Post: 09-05-2010, 06:48 PM -
NULL Value Of parameters
By riders in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 03-14-2008, 02:29 PM -
Img.getWidth(null); gives -1 why?
By willemjav in forum New To JavaReplies: 0Last Post: 02-15-2008, 02:06 PM -
What is NULL
By bugger in forum New To JavaReplies: 1Last Post: 01-09-2008, 04:55 PM -
parameters=null
By mary in forum Java ServletReplies: 1Last Post: 07-13-2007, 04:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks