Skip to content

Scala import cannot be resolved in Java project #554

@s0meRandomDev

Description

@s0meRandomDev

I am working on a Java Play 2.6 project and wanted to switch from eclipse (ScalaIDE) to VSCode (because I use VSCode for everything else and I largely prefer to work with it rather than eclipse).

In Eclipse, I have no problem importing a Scala source ( scala.collection.Seq ) but in VScode, opening the same Eclipse project and having no problem with all other external librairies, it cannot resolve the scala.collection.Seq import. (more precisely it's the scala.collection import ).

When compiling my project in the console using sbt, I have no problem.
Also Eclipse is able to resolve that import. Maybe it has to do with the "Scala library container" exlipse plugins of ScalaIDE

Environment
  • Linux Ubuntu 16.04
  • JDK version: 1.8
  • Visual Studio Code version: 1.23.1
  • Java extension version: Language support for Java(TM) by Red Hat 0.26.0
Steps To Reproduce
  1. Create a Java play project using sbt
  2. Import it in ScalaIDE
  3. Create a class that imports scala.collection.Seq
  4. Open the project in VSCode.

Logs : No errors in the logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions