Originally posted by Ernest Friedman-Hill:
Well, the first step would be to find the antivirus program you want to use. Finding one that can be invoked via a command line with a filename as an argument may be harder than you think! Once you've found such a program, then invoking it would just be a matter of using Runtime.exec(). But first go find the tools, then come ask for more details.
Thank you for ur reply.
Yes actually I want to call Mcafee. Means the exe of Mcafee anti virus.
I got that exe. now I want to pass file name to the exe...that also work. But I want to call that exe from java program.
From command line while I am executing the command from command line its working...for example :
C:\Program Files\Common Files\Network Associates\VirusScan Engine\4.0.xx\scann /ALL *.txt
but while I am using the same in my java program its not working..
i.e.
Process p = runtime.exec("cmd /c find \"System\" C:\\Program Files\\Common Files\\Network Associates\\VirusScan Engine\\4.0.xx\\scann /ALL");
so pls help me..
Thanks in advance..
Regards,
Sundeep Mohanty.