0

hi i'm trying to print a simple "hello world" with Javalin in my local host but i keep getting this error "Cannot resolve method 'result(java.lang.String)'"and i don't know how to fix it and this is my code with i copied it from Javalin doc page.

import io.javalin.Javalin;


public class HelloWorld {
    public static void main(String[] args) {
        var app = Javalin.create(/*config*/)
                .get("/", ctx -> ctx.result("Hello World"))
                .start(7080);
    }
}

i have tried importing different libraries but none of them worked.

1 Answers1

0

i figured it out that the problem was my Intellij idea and the javalin files were be read by kotlin language ; so i uninstall it and reinstall the Intellij idea again with the new version and the problem got fixed