You can write some programs with little mathematical use, but it might get difficult to go very far; for instance, you won't be writing cool games. As for algebra, most of the math you'll see will be similar to that, where everything is in variables. On the other hand, you probably won't need to know how to find x in
5x/(3x^2) - 5y^2 = 10 where y = 5.
That said, C++ can be a difficult place to start. Java will probably be easier, but that's not to say it will be easy. You might also consider C# (very similar to Java) or Visual Basic.NET (considered easier to learn in some circles).
For a Java compiler, you can get it from
Sun's website (you want the JDK). You'll also want an IDE to develop in; there's several around, and they can get complicated. I would use Eclipse if it were me, but I'm most familiar with that one and it does have a lot of heavy features you won't need.
If you decide to try C# or VB.NET, you can get free compilers and an IDE from
Microsoft.