SlideShare a Scribd company logo
1 of 15
Download to read offline
Installing Spark Scala
Console in Windows-10
ANKITKUMAR KANERI
Agenda
• Software Requirements
• Installing the jdk and jre
• Installing Scala Interpreter
• Working with Scala interpreter
• Important links
System & Software Requirement
• Windows : PreferredWindows 10
• RAM : 8GB or more
Installing jdk and jre
• Go to Oracle website and find for Java
SE Development Kit 8u191 or visit
link: Java SE Development Kit 8
Downloads.
• Select relevant machine and click on
respective download link.
Note: click on radio button to accept the
License Agreement.
• Install the jdk executable file and note
the location while installing the jdk and
complete the instalation.
• To cross check the installation of jdk
simply go to the CMD and execute
javac command. If it says javac is not
recognized then the java is not
installed on your system.
• You can also cross check by going to
the windows explorer, 99% times java
will be installed in the C folder in
Program Files folder.
• If java folder exist that mean java is
already installed.
• After installing you need to set the
environment variable for the java in
this system,To do that follow the
below steps:
1. Go toControl Panel
2. Click on System and Security
3. Click on System
4. Click on Advance System Settings
and on EnvironmentVariables
5. Go to SystemVariable and select PATH and
click on edit
6. Click on New,You need to copy the folder
path until bin for the jdk folder in windows
explorer which you have installed in
system(program files folder) in my case it is
as shown in the below fig.
7. Similarly for the jre also, Note down the jre
path until bin and paste it in the path under
environment variable by clicking on new
button add it in the path.
8. Now we will set JAVA_HOME User variable
under UserVariable at the top.
9. Click on new and write JAVA_HOME in
variable and input theVariable value as
path of java which you installed,This time
you need to copy the path until jdk folder
only as shown in the fig.
10. Now check for javac in Command Prompt
and it will compile java source file and
successfully installed the java in the
system.
Installing Scala Interpreter
• Now we will install sbt i,.e. Scala Interpreter.
• To download search for Scala download or visit
page: Scala download
• Download and Install sbt MSI file for windows.
• Note down the path in which the sbt is
installed.
• Browse for the installed location i.e. Program
Files(X86) search for the sbt folder and copy
the path until bin folder and set the
environment variable for the same by
following same steps which we followed for jdk
and jre.
Working with Scala interpreter
• Go toCommand Prompt and create project by mkdir or you can
directlyCD to the folder.
• Create folder with the command mkdir Scala Samples and click on
enter.This folder you will see in Users folder in C drive named as Scala
Samples. Or you can directly give path in which you want to create
project with CD command.
Ex: C:Usersankit> mkdir Scala Samples (create new folder)
OR C:Usersankit> cd C:UsersankitScala Samples (existing folder)
• Enter sbt command and for the very first time it will take some time
to download some necessary files and directories related to the Scala
projects.
• Now start the Scala Interpreter by entering command as sbt console
and it will take you to the Scala Interpreter and you can start using it
for the coding.
Working with Scala interpreter
• Scala is modern multi-paradigm programming language designed to
express common programming patterns in a concise, elegant and
type-safe way.
• Scala is scalable language and it use uses most of Object Oriented
concepts.
• Before Scala language Java, Ruby, R and Python were known
languages for the Spark Operations.
• Dynamic in nature.
• IDE Support(NetBeans, IntelliJ, Eclipse).
• Uses Java existing libraries.
• We can use Scala for comparing strings example shown below:
scala> val a = "Ankit“ // within double quote it will treat as string
a: String = Ankit
scala> val b = "ankit"
b: String = ankit
scala> a == b // compare a string with b string
res0: Boolean = false
scala> a.toUpperCase == b.toUpperCase // comparing two string a and b. By
converting both the strings to upper case and comparing
res1: Boolean = true
Input: scala> "I work for company SAP LABS".split(" ").foreach(println) //printing each word
will be printing in next line
Output:
I
work
for
company
SAP
LABS
-------------------------
Input: val s = "I work for company, SAP LABS&FreeLancer"
s: String = I work for company, SAP LABS&FreeLancer
scala> s.split(“ ").map(_.trim)// splitting the string by space and trimming it will convert it to the
array of string.
Output: res4: Array[String] = Array(I, work, for, company,, SAP, LABS&FreeLancer)
Important links
• Scala Documentation
• Scala ProgrammingWIKI
• ScalaTutorials PointScalaTutorial
Thank you

More Related Content

What's hot

Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
Jukka Zitting
 

What's hot (20)

Apache development with GitHub and Travis CI
Apache development with GitHub and Travis CIApache development with GitHub and Travis CI
Apache development with GitHub and Travis CI
 
London Community Summit - Habitat 2016
London Community Summit - Habitat 2016London Community Summit - Habitat 2016
London Community Summit - Habitat 2016
 
Learning chef
Learning chefLearning chef
Learning chef
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Apache Curator: Past, Present and Future
Apache Curator: Past, Present and FutureApache Curator: Past, Present and Future
Apache Curator: Past, Present and Future
 
Time Machine
Time MachineTime Machine
Time Machine
 
Building a chatbot – step by step
Building a chatbot – step by stepBuilding a chatbot – step by step
Building a chatbot – step by step
 
Java Application Servers Are Dead!
Java Application Servers Are Dead!Java Application Servers Are Dead!
Java Application Servers Are Dead!
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swagger
 
Creating SaltStack State data with Pyobjects
Creating SaltStack State data with PyobjectsCreating SaltStack State data with Pyobjects
Creating SaltStack State data with Pyobjects
 
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Database migrations with Flyway and Liquibase
Database migrations with Flyway and LiquibaseDatabase migrations with Flyway and Liquibase
Database migrations with Flyway and Liquibase
 

Similar to Installing spark scala console in windows 10

Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Kalkey
 
Functional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdfFunctional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdf
ssusercd195b
 

Similar to Installing spark scala console in windows 10 (20)

Installation of java and program execution
Installation of java and program executionInstallation of java and program execution
Installation of java and program execution
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in Android
 
Capybara and cucumber with DSL using ruby
Capybara and cucumber with DSL using rubyCapybara and cucumber with DSL using ruby
Capybara and cucumber with DSL using ruby
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
Play Framework Tutorial
Play Framework Tutorial Play Framework Tutorial
Play Framework Tutorial
 
Java part 1
Java part 1Java part 1
Java part 1
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
How to run appache spark on windows(in sbt console)
How to run appache spark on windows(in sbt console)How to run appache spark on windows(in sbt console)
How to run appache spark on windows(in sbt console)
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
 
Functional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdfFunctional Scala 2022 - scalajs Alexis.pdf
Functional Scala 2022 - scalajs Alexis.pdf
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Oracle WebLogic
Oracle WebLogicOracle WebLogic
Oracle WebLogic
 
Cocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSCocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOS
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Installing spark scala console in windows 10

  • 1. Installing Spark Scala Console in Windows-10 ANKITKUMAR KANERI
  • 2. Agenda • Software Requirements • Installing the jdk and jre • Installing Scala Interpreter • Working with Scala interpreter • Important links
  • 3. System & Software Requirement • Windows : PreferredWindows 10 • RAM : 8GB or more
  • 4. Installing jdk and jre • Go to Oracle website and find for Java SE Development Kit 8u191 or visit link: Java SE Development Kit 8 Downloads. • Select relevant machine and click on respective download link. Note: click on radio button to accept the License Agreement. • Install the jdk executable file and note the location while installing the jdk and complete the instalation. • To cross check the installation of jdk simply go to the CMD and execute javac command. If it says javac is not recognized then the java is not installed on your system.
  • 5. • You can also cross check by going to the windows explorer, 99% times java will be installed in the C folder in Program Files folder. • If java folder exist that mean java is already installed. • After installing you need to set the environment variable for the java in this system,To do that follow the below steps: 1. Go toControl Panel 2. Click on System and Security 3. Click on System 4. Click on Advance System Settings and on EnvironmentVariables
  • 6. 5. Go to SystemVariable and select PATH and click on edit 6. Click on New,You need to copy the folder path until bin for the jdk folder in windows explorer which you have installed in system(program files folder) in my case it is as shown in the below fig. 7. Similarly for the jre also, Note down the jre path until bin and paste it in the path under environment variable by clicking on new button add it in the path. 8. Now we will set JAVA_HOME User variable under UserVariable at the top.
  • 7. 9. Click on new and write JAVA_HOME in variable and input theVariable value as path of java which you installed,This time you need to copy the path until jdk folder only as shown in the fig. 10. Now check for javac in Command Prompt and it will compile java source file and successfully installed the java in the system.
  • 8. Installing Scala Interpreter • Now we will install sbt i,.e. Scala Interpreter. • To download search for Scala download or visit page: Scala download • Download and Install sbt MSI file for windows. • Note down the path in which the sbt is installed. • Browse for the installed location i.e. Program Files(X86) search for the sbt folder and copy the path until bin folder and set the environment variable for the same by following same steps which we followed for jdk and jre.
  • 9. Working with Scala interpreter • Go toCommand Prompt and create project by mkdir or you can directlyCD to the folder. • Create folder with the command mkdir Scala Samples and click on enter.This folder you will see in Users folder in C drive named as Scala Samples. Or you can directly give path in which you want to create project with CD command. Ex: C:Usersankit> mkdir Scala Samples (create new folder) OR C:Usersankit> cd C:UsersankitScala Samples (existing folder) • Enter sbt command and for the very first time it will take some time to download some necessary files and directories related to the Scala projects.
  • 10. • Now start the Scala Interpreter by entering command as sbt console and it will take you to the Scala Interpreter and you can start using it for the coding.
  • 11. Working with Scala interpreter • Scala is modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant and type-safe way. • Scala is scalable language and it use uses most of Object Oriented concepts. • Before Scala language Java, Ruby, R and Python were known languages for the Spark Operations. • Dynamic in nature. • IDE Support(NetBeans, IntelliJ, Eclipse). • Uses Java existing libraries.
  • 12. • We can use Scala for comparing strings example shown below: scala> val a = "Ankit“ // within double quote it will treat as string a: String = Ankit scala> val b = "ankit" b: String = ankit scala> a == b // compare a string with b string res0: Boolean = false scala> a.toUpperCase == b.toUpperCase // comparing two string a and b. By converting both the strings to upper case and comparing res1: Boolean = true
  • 13. Input: scala> "I work for company SAP LABS".split(" ").foreach(println) //printing each word will be printing in next line Output: I work for company SAP LABS ------------------------- Input: val s = "I work for company, SAP LABS&FreeLancer" s: String = I work for company, SAP LABS&FreeLancer scala> s.split(“ ").map(_.trim)// splitting the string by space and trimming it will convert it to the array of string. Output: res4: Array[String] = Array(I, work, for, company,, SAP, LABS&FreeLancer)
  • 14. Important links • Scala Documentation • Scala ProgrammingWIKI • ScalaTutorials PointScalaTutorial