Well good luck I guess. You don't give anything that would make it remotely possible to
a) help you with anything
b) have any indication that Java is in some way involved
I highly doubt that this Java application is consuming 3.5gb of memory unless you specify to Java to create a minimum heap size that big (in which case I don't know why you're posting this, I assume you know what you're doing). It is likely going somewhere else.
Sounds like you are creating a lot of objects, and not throwing them away when you no longer need them.
With the data provided (none) there's nothing more anyone can say with any degree of certainty.