I'm drawing various fancy cubes. I'm using Octave, which is fine for generating the data but not so great on drawing cubes. (In case you're curious, I'm drawing projections of hypercubes.) Any help?
Try processing at processing.org. You'd be coding in java with open gl graphics and can do some amazing things. Drawing cubes shouldn't be too difficult to do depending on what you're trying to do. Its not a drawing tool but a programming environment to do interactive graphical programming with many example programs. A lot of computer artists use it for their work.
Here's an interesting video showing how to construct hypercubes:
Of course you can work with multi dimensional arrays in Java. But you could also use some other programming language. Use whichever you are most familiar with.
Anyway, if you want to stick with Java you can use the Apache commons math library http://commons.apache.org/proper/commons-math/index.html