I cannot build a scala environment.

Asked 1 years ago, Updated 1 years ago, 437 views

I think java has been installed, but

>javac-version
javac1.8.0_302

Probably because stb is not installed well,
IDE cannot use scala

 C:\>sbtsbt-version
[warn]Neither build.sbt nor a'project' directory in the current directory: "C:\"
c) continue
q) quit
?

Additional information

 C:\Users\Owner\Desktop\scala>sbt
[warn]Neither build.sbt nor a'project' directory in the current directory: "C:\Users\Owner\Desktop\scala"
c) continue
q) quit
?c
[warn] No sbt.version set in project/build.properties, base directory: C:\Users\Owner\Desktop\scala
[info] welcome to sbt 1.4.6 (Temurin Java 1.8.0_302)
[info] set current project to scala (inbuild file:/C:/Users/Owner/Desktop/scala/)
[info] sbt server started at local: sbt-server-5814c1c154581fd6564b
[ info ] started sbt server
sbt —scala>println("Hello world")
[error] Expected ID character
[error] Not a valid command: println
[error] Expected project ID
[error] Expected configuration
[error] Expected ':'
[error] Expected key
[error] Not a valid key: println (similar: printWarnings, installSbtn, terminal)
[error] println ("Hello world")
[Error] ^

For some reason, I get an error.
There is also an error when configured in IDE.

What should I do?

Enter a description of the image here

scala

2022-09-30 21:59

1 Answers

Preparing the Scala Development Environment: According to JDK and sbt installation, a question message appears on initial boot.
Enter c and press Enter to proceed with the environment build process.
(Because the target directory is created in the current directory, it is recommended that you create a working directory instead of just under drive C.)


2022-09-30 21:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.