Packaged Java applications run faster in Windows XP compatibility mode

According to some of my customers, Java applications run faster in Windows XP compatibility mode of Windows 7, but why?

I don't seem to have this problem myself, but they found that the application seems to be consuming 100% CPU without doing anything. Just set the attribute of an EXE or a batch file calling java to Windows XP compatibility mode to fix it, OK

Solution

There is no clear answer, but it is just a way of diagnosis in the field

You must confirm which process is consuming CPU and what it is doing, for example, by monitoring system calls: system tools such as process explorer and process monitor should lead to possible error clues At a minimum, you can compare execution profiles with incompatible modes

Since the problem may come from the Java application itself, you should try using a tool like NetBeans profiler for JVM analysis Maybe the code relies on some old windows xp specific content, such as the directory structure or environment variable windows 7 that no longer exists or has been changed (but you keep / reapply it in your own installation)... Resulting in incorrect error handling and infinite loop retry

Native windows analyzer may also be an option, but it is very difficult to analyze without JVM source code and Java code due to JIT

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>