Question: How do I compile and run a program in Java on my mac? 

I'm new.

Also I downloaded a program that was suggested to me on here called text wrangler if that has any bearing on the situation.

Answer: 
Download and install Eclipse, and you're good to go.  

<http://www.eclipse.org/downloads/>

Apple provides its own version of Java, so make sure it's up-to-date.  

<http://developer.apple.com/java/download/>

---

Eclipse is an [integrated development environment](http://en.wikipedia.org/wiki/Integrated_development_environment). It has many features, but the ones that are relevant for you at this stage is: 

* The source code editor
	+ With syntax highlighting, colors and other visual cues
	+ Easy cross-referencing to the documentation to facilitate learning
* Compiler
	+ Run the code with one click
	+ Get notified of errors/mistakes as you go

As you gain more experience, you'll start to appreciate the rest of its rich set of features.
You need to make sure that a mac compatible version of java exists on your computer. Do java -version from terminal to check that. If not, download the apple jdk from the apple website. (Sun doesn't make one for apple themselves, IIRC.)

From there, follow the same command line instructions from compiling your program that you would use for java on any other platform.