user2827214 user2827214 - 1 year ago 264
Java Question

Cannot find main class to run .jar, from Sbt-Assembly


mainClass in assembly := Some("Boot")


package src.main.myproject

object Boot extends App { ... }

Other Project Files:


Running the jar returns the error:

Error: Could not find or load main class Boot

Is there a problem with my project structure?

Answer Source

Your Boot is in src.main.myproject, so the mainClass should be src.main.myproject.Boot

Off topic in terms of the question, but it doesn't seem conventional that src.main is part of your package structure though, normally scala src directory of sbt is set to src/main/scala

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download