HomeHowTo › Compiling & Running Java Code on Mac OS

Compiling & Running Java Code on Mac OS

This is just a little reminder on how Java code looks like and how it is compiled and executed. I’m running OS X 10.10 and I have the Java for OS X 2014-001 package installed — not sure if this is necessary.

 

1. Write a Program

Example:

Save this as HelloWorld.java

 

2. Compile It

A HelloWorld.class will be created

 

3. Run It

 

Leave a Comment

Captcha Captcha Reload