Reputation: 35
I am receiving the following errors when I try to run a sample Hello world in Scala. The file has this statement saved in it. println("Hello World from a Scala Script!"). How to avoid these errors?
Sandeeps-MacBook-Pro:ScalaScripts sandeep$ scala Hello.scala
/Users/sandeep/Documents/ScalaScripts/Hello.scala:1: error: not found: value \
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf370
^
/Users/sandeep/Documents/ScalaScripts/Hello.scala:3: error: not found: value \
{\colortbl;\red255\green255\blue255;\red38\green38\blue38;}
^
/Users/sandeep/Documents/ScalaScripts/Hello.scala:3: error: not found: value \
{\colortbl;\red255\green255\blue255;\red38\green38\blue38;}
^
/Users/sandeep/Documents/ScalaScripts/Hello.scala:3: error: not found: value \
{\colortbl;\red255\green255\blue255;\red38\green38\blue38;}
^
/Users/sandeep/Documents/ScalaScripts/Hello.scala:4: error: not found: value \
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
^
/Users/sandeep/Documents/ScalaScripts/Hello.scala:8: error: not found: value \
\f0\fs24 \cf2 println("Hello World from a Scala Script!")}
^
6 errors found
Upvotes: 0
Views: 177
Reputation: 21557
Your path is wrong
look at this line
/Users/sandeep/Documents/ScalaScripts/Hello.scala
and then at this
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
Unix-like systems are using forward slash /
in its paths
Also it looks like your path in the script written not as a string path wrapped in "your path"
and Scala compiler is tries to use it as a some value
Upvotes: 1