A good choice would be Koding.
It offers a free VM with root access, 4Gb disk, 2Gb ram and a burstable CPU.
You can basically install anything on it and it will run because behind all the UI it’s a virtual Linux machine.
You can code your Java apps and run them afterwards directly in the browser.
There are a lot of Java developers and even groups that offer support. It offers collaboration features and you can code with your developer friends.