Home Ask Login Register

Developers Planet

Your answer is one click away!

Ryan Stull February 2016

Tell intelliJ to compile module with scalac in a java project?

I have a java project in intelliJ and I've added a few modules, one of which has scala code in it.

I want to tell intelliJ to compile this module with scalac not javac, but I can't figure out where to configure it, and when I try to compile it gives me this error, "Cannot create instance of scalac"


childofsoong February 2016

Per https://intellij-support.jetbrains.com/hc/en-us/community/posts/206001829-Project-configuration-explained:

A module that requires compiling with Scalac should have a Scala facet attached.

And further down (what I think you want):

To add Scala support to existing module:

  • Right-click the module in Project View, choose "Add Framework Support..."

  • Check "Scala" in technologies list (unavailable if module has Scala facet attached)

  • Provide a path to Scala installation (if not detected)

Post Status

Asked in February 2016
Viewed 2,103 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life