Is there an efficient way to limit the bandwidth of a certain java process?

I am familiar with solutions like trickle to limit bandwidth of a certain process on run time

sudo trickle -s -d 1024 /path/to/app.sh

But when dealing with java processes it makes it more of a challenge because the application initiates a JVM or in some cases a WRAPPER service that initiates a JVM - that means that solutions like 'trickle' will not work.

I can try and limit (using trickle) the whole java process (by wrapping / messing up with /usr/bin/java s.link) - UGLY. Does anyone know of a better solution for limiting the bandwidth of a java process (JVM)?

Thanks!

Edit
Report