To compile a program in Eclipse, type in the code, and fix the errors as Eclipse complains about them. Other errors may be discovered when you try to run the program. Unlike other environments, you don't have to do anything special to compile in Eclipse.