Your first project

This page makes a first project in the EK9 IDE and runs a program in it. It follows Help > Getting Started, and every picture is of the IDE doing each step.

The IDE as it first opens

Start the IDE with ek9 -ide. With no project open it shows the Welcome page, with the keys for the most used actions and, under the title, New to EK9? Getting Started, which shows these same steps in the IDE's Help tab.

The EK9 IDE with no project open: the Welcome page lists keyboard shortcuts under Window & Panels, Editor and Search & Navigation, with a link New to EK9? Getting Started under the title

Step 1: A new project

A project is a folder that holds your .ek9 files. Choose File > New Project….

The File menu open, with New Project… highlighted above Open Project…, Recent Projects, Save, Save All, Settings… and Exit

Choose where the folder goes and give it a name. The name is hello to start with; the line at the bottom shows the folder that Create will make.

The New EK9 Project dialog: Project name hello, the home folder chosen with its Desktop, Documents and Downloads folders listed, and "Makes" followed by the new folder's path above Cancel and Create

Choose Create. The folder is made and opened as the project.

Step 2: A new EK9 file

In the Project panel, right-click the project and choose New EK9 File….

The Project panel with the project hello right-clicked: a menu with New Directory…, New EK9 File… (highlighted) and Add dev

Name it HelloWorld.ek9. The module name is filled in from the project, and the file opens with its first and last lines already written.

The New EK9 File dialog with File name HelloWorld.ek9 and Module name hello

HelloWorld.ek9 open in the editor, holding #!ek9, defines module hello and //EOF; the Build Output tab says Compilation successful

Step 3: The example program

Help > Getting Started shows the steps in the Help tab. Click ek9 -q 1 in step 3.

The Help tab showing GETTING STARTED: the steps in the IDE and in a terminal, with the command ek9 -q 1 in step 3 underlined as a link

The Answers tab opens at the answer to What does a minimal EK9 program look like?. Its sections start closed: open Example.

The Answers tab: the answer, then its closed sections Migration Context, Example and Typical Errors

The example is a whole program. Press Copy on it.

The Example section open: a program with defines module, defines program, MinimalProgram and stdout.println("Hello, World!"), with a Copy button at its top right

Step 4: Paste it in

In HelloWorld.ek9, select everything (Cmd+A on a Mac, Ctrl+A elsewhere) and paste (Cmd+V or Ctrl+V) the example over it, then save (Cmd+S or Ctrl+S). Saving compiles it: the status bar says Build clean, and a green run arrow appears beside the program's name, MinimalProgram().

HelloWorld.ek9 holding the example program, a green run arrow in the margin beside MinimalProgram(), and Build clean in the status bar

Step 5: Run it

Click the run arrow. Run Program opens with the program chosen; a program that takes arguments has them typed here. Choose Run.

The Run Program dialog with MinimalProgram chosen, from HelloWorld.ek9 line 5, no run configurations, an empty Arguments field, and Cancel and Run

The program runs and its output shows: Hello, World!

The run's window: Success, the Stdout tab holding Hello, World!, and program exit 0

Next