This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the first java program runs very slow

 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

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.
 
Bhanu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to diminish the priority of the thread that triggers the anti-virus process...and see if that helps.
 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Virus-software sounds like windows-pc.

Start a dummy application in your autostart-group.
 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I disable the option "Scan inside archive files" in Sophos antivirus software, the problem is solved.
 
Mahesh Rana
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dongshan,

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 .....
 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic