Add MOEA Framework to Kotlin project

I want to use the MOEA framework in my Kotlin/IntelliJ project on OS X 10.15.

I downloaded the compiled binaries from: and added the *.jar files as library to my Kotlin project. Than I converted one java file out of the examples folder to a Kotlin file and tried to compile it.

I get this error message: Unresolved reference: moeaframework

After I added the MOEA lib files I see that this lib is available in the IDE and the lib is referenced correctly, but unfortunately I can’t build the project.

This is the converted Kotlin example file:

import org.moeaframework.Executor
import org.moeaframework.core.NondominatedPopulation 
import org.moeaframework.core.Solution

object Example1 {

fun main(args: Array<String>) {
    //configure and run this experiment
    val result = Executor()

    //display the results
    System.out.format("Objective1  Objective2%n")

    for (solution in result) {
            "%.4f      %.4f%n",


The lib is also available in Project Settings / Libraries
I use JDK 13.0.1
JVM 1.8

Looks like it’s an issue with how you’re including the lib in your project.

You could use always Gradle if you want (org.moeaframework:moeaframework:2.12). There’s a bit of a learning curve as with any build system, but it sure makes working with dependencies easier.
You can create a Kotlin Gradle project using IntelliJ or by yourself (

this is working with

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.moeaframework:moeaframework:2.12"

compile 'io.github.microutils:kotlin-logging:1.6.20'
compile 'org.slf4j:slf4j-simple:1.7.25'

in build.gradle

thank you