The first java application/applet runs very slow (4 - 10 min) after PC boot up. Subsequent java program is OK (less than 1 min). The problem is due to Sophos anti-virus software. The first Java program triggers Sophos anti-virus software to run and the anti-virus program takes about 100% of CPU. So the other program just hang there. Anybody can help me to solve this problem. Thanks.
Best Regards,<br />DongShan<br /> <br />SCJP1.4, SCWCD1.4
Perhaps your antivirus program can be configured to ignore whatever activity is taking so long; or perhaps you can switch to a different antivirus program. I would say this is a question for the makers of this virus software.
Try to diminish the priority of the thread that triggers the anti-virus process...and see if that helps.
Thanks,<br />Bhanu<br />SCEA Step-I<br />SCBCD for J2EE 1.3<br />SCJP1.4
Joined: Dec 07, 2004
Ernest, Bhanu, thanks for your reply.
Because the antivirus software is corporate standard software, we cannot change it currently. There is not a setting in Sophos software to ignore the particular program like Java also. Unless we disable the antivirus software, but it cannot be done.
I think that the problem is not due to Java program itself but JVM. When JVM start, the antivirus program is triggered. So only first running Java program is affected. Not only application, but also applet.
Is there a way to start JVM (e.g. Java web start) when boot up and continue to activate it until PC shutdown?
Disabling the Archive scanning will hide realy viruses also. So, that is not the best solution.
Stefan's suggestion is the right approach.
Start a dummy "Hello World" app on statrup, it will take care of scanning your classes.zip or rt.jar .....
Joined: Dec 07, 2004
Thanks, Deep and Stefan. Deep, you are right. Disabling the Archive scanning is not a good solution.
Because our Sophos antivirus software is updated (update/close/start) once or twice per day, depends on how often the virus definition is updated. We need to run the dummy program not only at the boot up time, but also after antivirus software updating. I don't know how to run the dummy program automatically after software updating.