I can't figure out why I can't run my JAR files. I have been looking for hours, but I still have no clue.
Originally I need it for my Scala Spark data science thesis project, since I need to run the JAR files on a Spark Cluster, but even a very basic example doesn't work.
What I am trying to do, but that even fails is:
My test code:
object superSimpleTest {
def main(args: Array[String]): Unit = {
System.out.println("I'm a JAR")
}
}
I build the JAR file using Intellij as follows:
File -> Project Structure -> Artifacts -> + -> JAR with "from modules with dependencies". From the pop-up window I change the manifest output path to resources. After that I go to Build -> Build Artifact -> Build
My manifest looks like this:
- Manifest-Version: 1.0
- Main-Class: superSimpleTest
When I then run in terminal: java -jar JARNAME.jar I get the error:
Error: Could not find or load main class superSimpleTest
Honestly, at this point, I have no clue what I am doing wrong since the code runs fine within Intellij.
Someone that can help me go forward?

