There could be many different reasons for this, but on Windows the most common reason is that the Jar/Exe isn't properly signed.
I would also say that probably your program is matching a signature from a known virus by some unfortunate coincidence. However a Hello World program is not likely for this to occur.