score:1
for intellj idea, probably you will need to double check your module settings, and see if your scala
folder is marked as sources
root.
check this url for more details: https://www.jetbrains.com/help/idea/creating-and-managing-modules.html
score:1
when i experienced this issue after recreating your situation almost exactly step-by-step, what fixed the problem was putting the scala file, in your case main.scala
, in another package, named anything you want it to be, inside main/scala
. ultimately, the scala file's path would be something like
main/scala/<package-name>/main.scala
then, after fixing the package name in the scala file and running the scala file through intellij, everything worked as it was supposed to.
Source: stackoverflow.com
Related Query
- Scala - IntelliJ IDEA Error: Could not find or load main class
- Intellij IDEA Error: Could not find or load main class org.jetbrains.jps.cmdline.Launcher in Scala Project
- Could not find or load main class in scala in intellij IDE
- Could not find or load main class (classname) in Scala Intellij
- New scala project in Intellij - Error: Could not find or load main class
- Error when building Scala Maven project: Could not find or load main class scala_maven_executions.MainWithArgsInFile
- Scala Error: Could not find or load main class in both Scala IDE and Eclipse
- Dockerize a scala app: Could not find or load main class
- Error: Could not find or load main class Main Scala
- Kafka 8.2.0 on Scala 2.10/Windows - Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
- Error: Could not find or load main class in scala
- Scala jar: Error: Could not find or load main class
- Scala bazel Error: Could not find or load main class
- Reason and fix for "Error: Could not find or load main class Anne" on Scala Getting started tutorial
- Gatling Error: Could not find or load main class Engine
- "Could not find or load main class" error for Gradle-generated Scala JAR
- Scalatra could not find or load main class
- SparkSession throw Could not find or load main class
- Could not find or load main class org.scalatest.tools.Runner
- Error: Could not find or load main class with Spark in Eclipse
- Error: Could not find or load main class io.gatling.app.Gatling
- Could not find or load main class com.weekdays.claobj.Ann1
- Error: Could not find or load main class com.sundogsoftware.spark.RatingsCounte
- How to fix 'Error: Could not find or load main class' on scala application in Intellij?
- Could not find or load main class sbt-assembly executable jar
- Error: Could not find or load main class scala.tools.nsc.Main
- Gradle-Scala Project Error - Could not load Main Class
- Could not find or load main class Platform during docker container running
- Could not find or load main class Spark Docker
- Error: Could not find or load main class com.sparkarma.spark.WordCount
More Query from same tag
- How to match string containing plus symbol (+) in scala?
- java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
- Scala return Object type for Map method
- scala Future deadlock - fixed 4-thread pool
- manipulating data table joining in scala data frame
- zio assert subtype of algebraic data type
- How to do a GET Request on a REST API which has request Body using Scala?
- Passing data with request using Akka http
- Idiomatic Scala - Performing Functions on Tuple Values
- save current state in Scala
- How to convert Columns to rows in Spark scala or spark sql?
- Scala Actors - using SingleThreadedScheduler with receive
- Why does this usage of super yield this result
- How to pattern match with dependent type without using it?
- Is it possible to load word2vec pre-trained available vectors into spark?
- Scala - for loop on a string
- Why won't Scala parser combinators propagate failure inside a repeated (rep) clause?
- Where to put Play package for console to recognize command?
- Join two dataframes and replace the original column values using Spark Scala
- Scala - how to loop around list in functional way
- illegal cyclic reference involving object models
- How to prevent SBT to include test dependencies into the POM
- How do I create a Binding of HTML node conditionally?
- Spark Coalesce error - no such method
- Create a Scala class/object and serialize it
- Add a new line to a text file in Spark
- Scala Refer to a type parameter
- Iterate through a list of case class and just output a single case class
- Disable aggregation for a project/task combination
- Read large file into StringBuilder