Hi,
it really depends on how you want to develop your application and what is the goal of the development.
If you want to develop an app and then "use" it without modifications, then you should use DCE or LXC.
If you want to focus on the protocol definition and application behaviour, then you can use Python to build a simulation. however, in this case the application will have to be written in C++.
I'm fairly sure that you can use TCP and UDP sockets from Python tho, and in this case all the application could be in Python. It's not my favourite choice, so I can't say what's the pros and cons.
About Java... I don't think you can use it (unless you want to use LXC or DCE, again).
As a side note, all the applications in ns-3 are, by nature, distributed. Meaning that each application is (or should) be limited to the knowledge of the node it is installed onto.
Hope this helps,
T.