It seems I should ask for help more often, because as soon as I do, I usually figure out the problem
The problem was my windows firewall on my server pc. I never added exceptions to my firewall. After doing so I am able to connect with both mysql query browser and java using connector/j.