Exception in thread “main” java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConfHow do I get sbt 0.10.0 to compile files in a subdirectory?Can't execute jar- file: “no main manifest attribute”sbteclipse: Managed dependencies not found by eclipseSBT and External Libraries in IntellijAdd swf file in sbt processscalatest : object scalatest is not a member of package orghow to connect to cassandra through scala in play frameworkFailed running activator run after play-slick upgradebuild.sbt ProjectRef : not enough arguments for method applysbt unresolved dependency on Windows 7

Why do radiation hardened IC packages often have long leads?

Is it safe to change the harddrive power feature so that it never turns off?

What would prevent chimeras from reproducing with each other?

How do free-speech protections in the United States apply in public to corporate misrepresentations?

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

Why is long-term living in Almost-Earth causing severe health problems?

Non-aqueous eyes?

Origin of "boor"

What aircraft was used as Air Force One for the flight between Southampton and Shannon?

Write a function that checks if a string starts with or contains something

What would be the way to say "just saying" in German? (Not the literal translation)

Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?

Why Does Mama Coco Look Old After Going to the Other World?

If I leave the US through an airport, do I have to return through the same airport?

Getting UPS Power from One Room to Another

Electricity free spaceship

What differences exist between adamantine and adamantite in all editions of D&D?

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Separate SPI data

How to befriend someone who doesn't like to talk?

How to safely destroy (a large quantity of) valid checks?

I have a problematic assistant manager, but I can't fire him

Is it okay to have a sequel start immediately after the end of the first book?

Varying the size of dots in a plot according to information contained in list



Exception in thread “main” java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConf


How do I get sbt 0.10.0 to compile files in a subdirectory?Can't execute jar- file: “no main manifest attribute”sbteclipse: Managed dependencies not found by eclipseSBT and External Libraries in IntellijAdd swf file in sbt processscalatest : object scalatest is not a member of package orghow to connect to cassandra through scala in play frameworkFailed running activator run after play-slick upgradebuild.sbt ProjectRef : not enough arguments for method applysbt unresolved dependency on Windows 7






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















As I want to execute the jar generated by my scala project in the Command Line Interface, I get the following problem:
Exception in thread "main" java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConf



Although in the dependency file I mentionned scallop dependency as follow



import sbt._

object Dependencies
lazy val betterFiles = "com.github.pathikrit" %% "better-files" % "3.7.0"
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.2.27"
lazy val scallop = "org.rogach" %% "scallop" % "3.1.5"

// -- Logging
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
lazy val slf4jBackend = "org.slf4j" % "slf4j-simple" % "1.7.26"

// -- Testing
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"




My build.sbt file is the following:



import Dependencies._

ThisBuild / scalaVersion := "2.12.5"
ThisBuild / sbtVersion := "1.2.6"
ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
.settings(
name := "phenix-challenge",
libraryDependencies ++= Seq(
betterFiles,
scalaz,
scallop,

scalaLogging,
slf4jBackend % Runtime,

scalaTest % Test
)
)



If you have an Idea that could resolve my Issue please HELP!



Many thanks in advance










share|improve this question






















  • try invalidate cache/restart may be the issue will get resolve.

    – Raman Mishra
    Mar 25 at 6:36











  • Can you tell us how do you generate the jar file before you call the main class?

    – Alexey Novakov
    Mar 25 at 8:22











  • @AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

    – Iriel
    Mar 25 at 9:18












  • @JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

    – Alexey Novakov
    Mar 25 at 10:31











  • Do want to execute your jar as fat-jar outside of sbt?

    – Alexey Novakov
    Mar 25 at 10:55

















1















As I want to execute the jar generated by my scala project in the Command Line Interface, I get the following problem:
Exception in thread "main" java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConf



Although in the dependency file I mentionned scallop dependency as follow



import sbt._

object Dependencies
lazy val betterFiles = "com.github.pathikrit" %% "better-files" % "3.7.0"
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.2.27"
lazy val scallop = "org.rogach" %% "scallop" % "3.1.5"

// -- Logging
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
lazy val slf4jBackend = "org.slf4j" % "slf4j-simple" % "1.7.26"

// -- Testing
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"




My build.sbt file is the following:



import Dependencies._

ThisBuild / scalaVersion := "2.12.5"
ThisBuild / sbtVersion := "1.2.6"
ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
.settings(
name := "phenix-challenge",
libraryDependencies ++= Seq(
betterFiles,
scalaz,
scallop,

scalaLogging,
slf4jBackend % Runtime,

scalaTest % Test
)
)



If you have an Idea that could resolve my Issue please HELP!



Many thanks in advance










share|improve this question






















  • try invalidate cache/restart may be the issue will get resolve.

    – Raman Mishra
    Mar 25 at 6:36











  • Can you tell us how do you generate the jar file before you call the main class?

    – Alexey Novakov
    Mar 25 at 8:22











  • @AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

    – Iriel
    Mar 25 at 9:18












  • @JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

    – Alexey Novakov
    Mar 25 at 10:31











  • Do want to execute your jar as fat-jar outside of sbt?

    – Alexey Novakov
    Mar 25 at 10:55













1












1








1








As I want to execute the jar generated by my scala project in the Command Line Interface, I get the following problem:
Exception in thread "main" java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConf



Although in the dependency file I mentionned scallop dependency as follow



import sbt._

object Dependencies
lazy val betterFiles = "com.github.pathikrit" %% "better-files" % "3.7.0"
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.2.27"
lazy val scallop = "org.rogach" %% "scallop" % "3.1.5"

// -- Logging
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
lazy val slf4jBackend = "org.slf4j" % "slf4j-simple" % "1.7.26"

// -- Testing
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"




My build.sbt file is the following:



import Dependencies._

ThisBuild / scalaVersion := "2.12.5"
ThisBuild / sbtVersion := "1.2.6"
ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
.settings(
name := "phenix-challenge",
libraryDependencies ++= Seq(
betterFiles,
scalaz,
scallop,

scalaLogging,
slf4jBackend % Runtime,

scalaTest % Test
)
)



If you have an Idea that could resolve my Issue please HELP!



Many thanks in advance










share|improve this question














As I want to execute the jar generated by my scala project in the Command Line Interface, I get the following problem:
Exception in thread "main" java.lang.NoClassDefFoundError: org/rogach/scallop/ScallopConf



Although in the dependency file I mentionned scallop dependency as follow



import sbt._

object Dependencies
lazy val betterFiles = "com.github.pathikrit" %% "better-files" % "3.7.0"
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.2.27"
lazy val scallop = "org.rogach" %% "scallop" % "3.1.5"

// -- Logging
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
lazy val slf4jBackend = "org.slf4j" % "slf4j-simple" % "1.7.26"

// -- Testing
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"




My build.sbt file is the following:



import Dependencies._

ThisBuild / scalaVersion := "2.12.5"
ThisBuild / sbtVersion := "1.2.6"
ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
.settings(
name := "phenix-challenge",
libraryDependencies ++= Seq(
betterFiles,
scalaz,
scallop,

scalaLogging,
slf4jBackend % Runtime,

scalaTest % Test
)
)



If you have an Idea that could resolve my Issue please HELP!



Many thanks in advance







scala jar sbt






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 20:38









IrielIriel

56211




56211












  • try invalidate cache/restart may be the issue will get resolve.

    – Raman Mishra
    Mar 25 at 6:36











  • Can you tell us how do you generate the jar file before you call the main class?

    – Alexey Novakov
    Mar 25 at 8:22











  • @AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

    – Iriel
    Mar 25 at 9:18












  • @JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

    – Alexey Novakov
    Mar 25 at 10:31











  • Do want to execute your jar as fat-jar outside of sbt?

    – Alexey Novakov
    Mar 25 at 10:55

















  • try invalidate cache/restart may be the issue will get resolve.

    – Raman Mishra
    Mar 25 at 6:36











  • Can you tell us how do you generate the jar file before you call the main class?

    – Alexey Novakov
    Mar 25 at 8:22











  • @AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

    – Iriel
    Mar 25 at 9:18












  • @JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

    – Alexey Novakov
    Mar 25 at 10:31











  • Do want to execute your jar as fat-jar outside of sbt?

    – Alexey Novakov
    Mar 25 at 10:55
















try invalidate cache/restart may be the issue will get resolve.

– Raman Mishra
Mar 25 at 6:36





try invalidate cache/restart may be the issue will get resolve.

– Raman Mishra
Mar 25 at 6:36













Can you tell us how do you generate the jar file before you call the main class?

– Alexey Novakov
Mar 25 at 8:22





Can you tell us how do you generate the jar file before you call the main class?

– Alexey Novakov
Mar 25 at 8:22













@AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

– Iriel
Mar 25 at 9:18






@AlexeyNovakov as I am working with eclipse I package the project with sbt package then run sbt eclipse on the CLI

– Iriel
Mar 25 at 9:18














@JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

– Alexey Novakov
Mar 25 at 10:31





@JijiAR sbt package: Creates a JAR file (or WAR file for web projects) containing the files in src/main/scala, src/main/java, and resources in src/main/resources. It won't package libraries inside.

– Alexey Novakov
Mar 25 at 10:31













Do want to execute your jar as fat-jar outside of sbt?

– Alexey Novakov
Mar 25 at 10:55





Do want to execute your jar as fat-jar outside of sbt?

– Alexey Novakov
Mar 25 at 10:55












1 Answer
1






active

oldest

votes


















1














To execute the jar generated by your scala project in the Command Line Interface you can use sbt plugin to assembly a fat-jar including your libraries/dependencies. Having such jar you would be able to run your app via java -jar ...



There are several SBT plugins for build a fat-jar. Perhaps the easiest one would be the sbt-assembly.



  1. Add this plugin to file project/plugins.sbt (create this file if needed):
    addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

  2. Now use sbt to build a fat-jar:

sbt assembly


  1. Then run via java -jar YouMainClass

Another option is to use pure sbt to run Main class using command sbt run, then you do really need to build a fat-jar.






share|improve this answer























  • Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

    – Iriel
    Mar 25 at 12:28











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55328335%2fexception-in-thread-main-java-lang-noclassdeffounderror-org-rogach-scallop-sc%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














To execute the jar generated by your scala project in the Command Line Interface you can use sbt plugin to assembly a fat-jar including your libraries/dependencies. Having such jar you would be able to run your app via java -jar ...



There are several SBT plugins for build a fat-jar. Perhaps the easiest one would be the sbt-assembly.



  1. Add this plugin to file project/plugins.sbt (create this file if needed):
    addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

  2. Now use sbt to build a fat-jar:

sbt assembly


  1. Then run via java -jar YouMainClass

Another option is to use pure sbt to run Main class using command sbt run, then you do really need to build a fat-jar.






share|improve this answer























  • Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

    – Iriel
    Mar 25 at 12:28















1














To execute the jar generated by your scala project in the Command Line Interface you can use sbt plugin to assembly a fat-jar including your libraries/dependencies. Having such jar you would be able to run your app via java -jar ...



There are several SBT plugins for build a fat-jar. Perhaps the easiest one would be the sbt-assembly.



  1. Add this plugin to file project/plugins.sbt (create this file if needed):
    addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

  2. Now use sbt to build a fat-jar:

sbt assembly


  1. Then run via java -jar YouMainClass

Another option is to use pure sbt to run Main class using command sbt run, then you do really need to build a fat-jar.






share|improve this answer























  • Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

    – Iriel
    Mar 25 at 12:28













1












1








1







To execute the jar generated by your scala project in the Command Line Interface you can use sbt plugin to assembly a fat-jar including your libraries/dependencies. Having such jar you would be able to run your app via java -jar ...



There are several SBT plugins for build a fat-jar. Perhaps the easiest one would be the sbt-assembly.



  1. Add this plugin to file project/plugins.sbt (create this file if needed):
    addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

  2. Now use sbt to build a fat-jar:

sbt assembly


  1. Then run via java -jar YouMainClass

Another option is to use pure sbt to run Main class using command sbt run, then you do really need to build a fat-jar.






share|improve this answer













To execute the jar generated by your scala project in the Command Line Interface you can use sbt plugin to assembly a fat-jar including your libraries/dependencies. Having such jar you would be able to run your app via java -jar ...



There are several SBT plugins for build a fat-jar. Perhaps the easiest one would be the sbt-assembly.



  1. Add this plugin to file project/plugins.sbt (create this file if needed):
    addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

  2. Now use sbt to build a fat-jar:

sbt assembly


  1. Then run via java -jar YouMainClass

Another option is to use pure sbt to run Main class using command sbt run, then you do really need to build a fat-jar.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 25 at 11:52









Alexey NovakovAlexey Novakov

49949




49949












  • Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

    – Iriel
    Mar 25 at 12:28

















  • Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

    – Iriel
    Mar 25 at 12:28
















Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

– Iriel
Mar 25 at 12:28





Thank you very much your solution works perfectly for me. In fact I had to think about the fact of generating a fat jar and then I should use sbt assembly. Thanks again!

– Iriel
Mar 25 at 12:28



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55328335%2fexception-in-thread-main-java-lang-noclassdeffounderror-org-rogach-scallop-sc%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript