The program's module references the class it uses from the new one

The complete source of packaging_twomodules_hello.ek9, compiled by the EK9 compiler. Shown on packaging.html.

#!ek9
defines module site.packaging.twomodules

  references
    site.packaging.twomodules.introduction::AnotherClass

  defines package
    version <- 1.0.0-0
    description <- "Simple samples"
    applyStandardIncludes <- true

  defines program
    HelloWorld()
      stdout <- Stdout()
      another <- AnotherClass()
      stdout.println(`Hello, World ${another.greeting()}`)

Download packaging_twomodules_hello.ek9

Output

Hello, World from another module