Multiple factors cause differences in how a JAR file is detected on VirusTotal. A major reason is the limited behavioral analysis of the command-line antivirus engines used on the platform as discussed already, which may not have the same capabilities as their full desktop versions.
Additionally, different engines have varied rules and signatures as well as vendor-specific configurations that affect their detection aggressiveness.
Finally, the absence of cloud-based detection in some command-line versions, which is a key feature of many desktop products, can also lead to discrepancies.