How to open a .scala file
Quick, free ways to open Scala on any system.
A .scala file is a Scala Source File. If double-clicking does nothing, your computer simply does not have an app that reads Scala yet. Here is how to fix that on each operating system, using free software wherever possible.
Open a .scala file step by step
- Confirm the file really is a .scala. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
- On Windows, open it with IntelliJ IDEA or VS Code (Metals).
- On Mac, use IntelliJ IDEA or VS Code (Metals).
- On Linux, try IntelliJ IDEA or VS Code (Metals).
- Still stuck? Convert the .scala to class (bytecode), which opens more widely.
Best apps to open .scala files
Windows
- IntelliJ IDEA
- VS Code (Metals)
- any text editor
macOS
- IntelliJ IDEA
- VS Code (Metals)
- any text editor
Linux
- IntelliJ IDEA
- VS Code (Metals)
- any text editor
!
Before you open it: Caution. A .scala file is program source. Compiling and running it executes its code; review unfamiliar files first.
Frequently asked questions
Why can't I open my .scala file?
Almost always because no installed app understands Scala. Install one of the apps above, or convert the file to a format your existing software already reads.
How do I run a .scala file?
With Scala installed, run scala file.scala for a quick script, or build a project with sbt. IntelliJ IDEA can compile and run it too.
Does Scala run on the JVM?
Yes. Scala compiles to Java bytecode and interoperates with Java libraries, though Scala.js and Scala Native target JavaScript and native code as well.