Convert between scaladsl.Uri and javadsl.Uri?

Before Akka Http 1.1.0 we could convert a Javadsl URI to its Scaladsl counterpart via


This is now forbidden as JavaUri was made private.

Scaladsl to Javadsl conversion was possible with


What is the recommended approach for these conversions with Akka Http 1.1.x?

Please open a ticket on

I think we should expose an additional create method, since nowadays impl is anyway:

  public static Uri create(String uri) {
    return new JavaUri(akka.http.scaladsl.model.Uri.apply(uri));