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;
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
|
show 1 more comment
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
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 withsbt package
then runsbt 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
|
show 1 more comment
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
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
scala jar sbt
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 withsbt package
then runsbt 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
|
show 1 more comment
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 withsbt package
then runsbt 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
|
show 1 more comment
1 Answer
1
active
oldest
votes
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.
- Add this plugin to file
project/plugins.sbt
(create this file if needed):addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
- Now use sbt to build a fat-jar:
sbt assembly
- 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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
- Add this plugin to file
project/plugins.sbt
(create this file if needed):addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
- Now use sbt to build a fat-jar:
sbt assembly
- 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.
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
add a comment |
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.
- Add this plugin to file
project/plugins.sbt
(create this file if needed):addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
- Now use sbt to build a fat-jar:
sbt assembly
- 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.
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
add a comment |
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.
- Add this plugin to file
project/plugins.sbt
(create this file if needed):addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
- Now use sbt to build a fat-jar:
sbt assembly
- 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.
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.
- Add this plugin to file
project/plugins.sbt
(create this file if needed):addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
- Now use sbt to build a fat-jar:
sbt assembly
- 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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 runsbt 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