I can't import the WebSocketSettings package in the WebSocket example from the documentation

Hello! I’m studying the akka and try it in code. I took this example (below), assembled the necessary packages (akka-http, akka-stream) using the graddle (or sbt). But my IDE does’t find the WebSocketSettings package on the line 23 (in GitHub) “import akka.http.javadsl.settings.WebSocketSettings;”. As a result, this code does’t work. There all the other packages is fine in this example. Please tell me what I’m doing wrong.

The code example is here:


@Storm-Sergey can you post a link to your project?

1 Like

I have no project. I just took this example and tried to use it to see how it works. I will add what I tried to run to show you.

If I try to build the project, I get this result. As if this package doesn’t exist.

The reference to get is ambiguous error suggests you are using a version of Akka HTTP prior to 10.1.6. Akka HTTP should work with JDK 11 since 10.1.6. Could you update to the latest version (10.1.7) and show what errors you get then?

1 Like

Oh. I’m stupid. I tried to build a project with gradle but there was a maven akka-http-seed-java.iml file inside. After deleting example is perfectly worked. Thank you very much

1 Like