• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Program for Virus Checking

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write a java program, which will read or fetch file name and check for virus by using some antivirus and if the file is not infected then it must return boolean true otherwise false.
But I don't know how to write the code. If anybody give me any hind or sample code then I will be thankful to him/her.
Regards,
Sundeep.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sundeep Mohanty
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!