In DOS-type command window, Java program will not start for 10 seconds; javac and cpp are ok

Bruce_R 1 Reputation point
2021-02-19T16:02:59.147+00:00

Someone suggested I post this here... can't find any tags that suggest that's correct.

I've been working on a large Java program (application, not applets) and related test programs for several years. I build/run them in a DOS-style command line with javac. Never had any issues until after I got a new 64-bit desktop with 16 GB RAM, 64-bit Windows 10.

Until about the summer 2020, all was fine. Now, when I type "java ...." at the command prompt to run one of the programs, the o/s often (not always) sits there, sometimes 4 seconds, sometimes 30 or more... then it will run. By the way, the Java compiler, javac, is not a problem.

Recently, I found that if I enter Ctrl-C while it is delayed, it will break whatever is holding it up, then run. fwiw, I use PC-Matic for anti-virus, and by chance, I found that if I disable its 'super shield', the problem goes away -- MOST times but not always.

This also happens with one of 3 C-language programs I wrote - invoked from the command line. The one that delays invokes a java program to run via the system() function. So it's obvious java is the problem. I have yet to hear back from the makers of PC Matic... so it's probably time to replace it.

Any insight? Thank you.

Community Center Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. haratom 6 Reputation points
    2021-02-20T04:43:02.58+00:00

    It seems PC Matic has two protection modes. One is SuperShield and the other is Industry Standard (blacklist).
    Explanation on the PC Matic's web site says Industry Standard (blacklist) is lighter that SuperShield but less secure.

    How about switch to Industry Standard (blacklist) mode only in the case if you run own Java program?


  2. Anonymous
    2021-02-22T02:44:49.637+00:00

    I'd try asking for help over here in dedicated forums.
    https://www.oracle.com/java/technologies/javacommunity.html

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.