They dont detect hacks using only signatures. You still need an open handle to the game window to be able to read its memory and that can be detected (given time).
What I mean is, you can use C, Java, Python or Haskell for all I know. VAC can still, technically, detect your shit because under the hood they all use the same methods to read/write to the game.
Also, do yourself a favor and don't use Java for game hacking, it's not worth the trouble.