-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala import cannot be resolved in Java project #554
Comments
Ok so I solved my problem. It's not because of VS Code. For some reason the I don't find this solution very clean though, so If anybody has a better suggestion, i'm all ears. Lines added to the .classpath file :
|
Sorry but vscode-java doesn't support scala:
I'm not a Scala user so I don't have the answers. Maybe switching to Maven would help (probably not), but right now, tweaking the .classpath is your best option |
I do so. But vscode still can't resolve scala imports. |
So does it solve now? |
has the same issue |
Apparently using Metals extension works for project that has both java and scala. |
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 thescala.collection.Seq
import. (more precisely it's thescala.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
Steps To Reproduce
scala.collection.Seq
Logs : No errors in the logs.
The text was updated successfully, but these errors were encountered: