-4

Sometimes a program is picked up by anti virus as a virus is there anything that can tell a developer what line of code is causing this? or at least the class or file?

2 Answers2

0

Often antivirus of emails (like gmail) block the possibility to add a jar file as an attachment.

Simply rename it to a different name if this is your problem.

For example instead of

myLib.jar

rename it to

myLib.jar.rename
Davide Lorenzo MARINO
  • 26,420
  • 4
  • 39
  • 56
0

Microsoft Outlook, for one, blocks numerous file type due to their ability to contain or function as viruses. Java files (jar, class, java) are not among these in Outlook 2013, but Outlook 2010 blocks .jar files.

Jar files can be executable, and for that reason, they will be at least detected by decent antivirus systems. Google Chrome warns whenever a .jar file is downloaded that it can be harmful.

In regards to your question specifically, there is likely nothing that can be done with the code of the program to make it appear safe. It is either the file extension or the origin of the file that cause false positives. Like Davide said, changing the extension will probably let the file slip past in a download. As an answer on another question suggested, if your code involves downloading other files, your code's download method could match the signature of a known threat.

Aside from the reasons I have stated, there are no predictable reasons as to why an antivirus could dislike your program. Maybe with some more information on the program in question, the means of packaging and delivering, and the antivirus behavior, we could reach a more specific conclusion.

Community
  • 1
  • 1
  • The program is a Client for a rsps i was assigned to work on in my java class it is jarred and self signed by jarmaker and the anti virus is avg virus total states that the problem is in the rsImageProducer class which is a know problem to the community the class is a graphics drawing class and when i took a look inside there was nothing that seemed malicious and the class is very small i missed nothing. FURTHERMORE I AM NOT USING ANY FORM OF EMAIL OR DOWNLOADING ANYTHING THIS PROBLEM IS PURELY FROM RUNNING THE JAR ON MY DESKTOP – SlapsPeopleWithTunaRandomly Jul 22 '15 at 17:37
  • @SlapsPeopleWithTunaRandomly So is the code supposedly causing the issue your code, or code that you obtained elsewhere? – Michael Brandon Morris Jul 22 '15 at 18:07