The code you have written, when compiled, matches the signature that your AV uses to detect a trojan. That does not mean that your java program is an exploit, or that it could do any harm, only that there's a similarity strong enough that your AV has flagged it. It could be the long string of ones and zeros, or what your program does with it.