It doesn't matter how it's made as long as its made well. They are the languages that's been taught to us so far, though not specifically how to animate things.
So which is easier, a pure Java program? Or a Web based page?
At the end of the day though: go with which one you’re more familiar with. They will both allow you to create simple animations, the only difference is how long it will take to write the code which is purely based on your confidence with that language.
I hope this helped 🙂