0

I am using IntelliJ IDE.

I want to import scala.reflect.io.File from the package - scala-reflect-2.11.4. But when I type in import scala.reflect, the compiler thinks that I am trying to use the class reflect from the package scala-library-2.11.8.

How do I force the compiler to use import the class scala.reflect.File from scala-reflect-2.11.4?

Soren Goyal
  • 196
  • 4
  • 1
    Compiler scans the class path. Sounds like you're just missing reflect.jar. I don't know without trying how Idea manages the class path. In general, `scala.reflect` can be located in multiple file locations. – som-snytt Jul 20 '16 at 00:43
  • What version of IntelliJ are you using, and how are you managing dependencies? – CassOnMars Jul 20 '16 at 00:45
  • Have you added the `jar` file as an [external library](http://stackoverflow.com/questions/7065402/how-to-add-external-library-in-intellij-idea#15960913)? – jwvh Jul 20 '16 at 01:23

0 Answers0