So this is going to be a bit longer. I’m going to also explain how I found this so you can do this yourself the next time you run into a problem like this.
After a bit of googling (“java socket Exception Permission denied”) I found out that for some reason the security manager did allow you to connect to that socket, obviously
I found someone with the same problem: https://community.oracle.com/thread/2093510?start=0
So after that I was starting to look at some documentation for the responsible parts:
Security Manager, check Permission, the socket permission class
That let me to the permission in the jdk page with the part about socket permissions.
Another thing you should look at are android permissions. I guess you are running on android based on your Exception. Android apps as far as I know need to request permissions for a lot of operations so I would look into that:
Those are the links I found with just a few google searches. I am not an android developer so I can’t really help you more, but I think those links should give you a good starting point. If you find some tutorials, they might help as well. Just be sure you don’t follow them blindly, because security is always a hard thing to get right and should not be taken lightly, but than I don’t know what you are trying to do
One of the hardest thing in programming is too learn how to google. It sounds stupid but knowing which keywords to use to find the right answers is extremely helpful. IMO asking on forums should be the step once you can no longer find an answer. (and btw, most questions have already been asked and answered )