← Back to Scala Course | Chapter 1: Setup & Basics | Lesson 2 of 8

Scala Install करना

Scala install करना painting से पहले अपने art supplies लेने जैसा है। Scala Java के engine के ऊपर चलती है, इसलिए पहले उसे install करें और फिर उसके ऊपर Scala जोड़ें।

In this page:

  1. Installing Scala

Installing Scala

Scala JVM पर चलती है, इसलिए पहले एक JDK install होना चाहिए, फिर Scala toolchain (compiler, REPL, और build tools) खुद। ज़्यादातर developers Scala को coursier (cs command) या किसी package manager के ज़रिए install करते हैं।

Install होने के बाद, scala और scalac आपके PATH पर उपलब्ध हो जाते हैं।

Note: install करने के बाद scala -version चलाएं यह पुष्टि करने के लिए कि JVM और Scala toolchain दोनों सही तरीके से set up हैं।

उदाहरण: Installing Scala

bash
# Linux (using coursier)
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs
chmod +x cs && ./cs setup

# macOS (Homebrew)
brew install scala

# Windows (Chocolatey)
choco install scala

# Verify installation (all platforms)
scala -version

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. पहले JDK के बिना Scala install करना, जिससे scala या scalac command fail हो जाता है क्योंकि कोई Java runtime नहीं है।
  2. installation के बाद नया terminal न खोलना, जिससे scala को command not found बताया जाता है क्योंकि PATH refresh नहीं हुआ।
  3. पुराने JDK का उपयोग करते हुए बहुत नया Scala version install करना, जबकि दोनों compatible होने चाहिए।
🔒

Chapter Quiz — Complete all 8 topics to unlock

0/8 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.