I was stucked with the same problem with maven build. When you are creating the artifact from project structure settings (ctrl+alt+shift+S), you have to change manifest directory:
<project folder>\src\main\java
change java to resources
<project folder>\src\main\resources
I have also used the option extract to the target JAR, and it’s working well.
EDIT
You can find a detailed step-by-step, an other solutions here: https://stackoverflow.com/a/45303637/2640826
Related Posts:
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- What causes “Unable to access jarfile” error?
- Can’t execute jar- file: “no main manifest attribute”
- Can’t execute jar- file: “no main manifest attribute”
- What exactly does a jar file contain?
- Running JAR file on Windows
- Running JAR file on Windows 10
- How to use java.net.URLConnection to fire and handle HTTP requests
- Differences between “java -cp” and “java -jar”?
- Lombok and Maven
- What does the arrow operator, ‘->’, do in Java?
- java.lang.NoClassDefFoundError: Could not initialize class XXX
- How do I create executable Java program?
- Error: Could not find or load main class in intelliJ IDE
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing in Intellij
- How to decompile a whole Jar file?
- “A java exception has occurred” when opening .jar
- Java file outside of source root intelliJ
- IntelliJ: Error:java: error: release version 5 not supported
- unused import statement for used ones in IntelliJ IDEA
- Exception in thread “main” java.lang.ClassNotFoundException:
- Eclipse “Error: Could not find or load main class”
- What causes java.lang.IncompatibleClassChangeError?
- Error: JavaFX runtime components are missing, and are required to run this application with JDK 11
- How to fix “unsupported class file major version 60” in IntelliJ?
- Access restriction: The type ‘Application’ is not API (restriction on required library rt.jar)
- intellij incorrectly saying no beans of type found for autowired repository
- How can I edit a .jar file?
- JAVA_HOME should point to a JDK not a JRE
- Error:java: javacTask: source release 8 requires target release 1.8
- IDEA: javac: source release 1.7 requires target release 1.7
- How to clear react-native cache?
- IntelliJ – Can’t start – “JAVA_HOME does not point to a valid JVM installation”
- Corrupt jar file
- Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
- No found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:
- SQL Error: 0, SQLState: 08S01 Communications link failure
- HashSet vs LinkedHashSet
- How to import a jar in Eclipse
- Error: Module not specified (IntelliJ IDEA)
- Syntax error, insert “… VariableDeclaratorId” to complete FormalParameterList
- Difference between jar and war in Java
- How to extract .war files in java? ZIP vs JAR
- “Cannot start compilation: the output path is not specified for module…”
- java ‘jar’ is not recognized as an internal or external command
- intellij idea – Error: java: invalid source release 1.9
- String index out of bounds exception java
- Java “lambda expressions not supported at this language level”
- What is the equivalent of Java’s System.out.println() in Javascript?
- Where can I download the jar for org.apache.http package?
- Could not find or load main class with a Jar File
- Java error no lwjgl64 in path?
- Class JavaLaunchHelper is implemented in two places
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- What’s the equivalent of Java’s Thread.sleep() in JavaScript?
- What does Java option -Xmx stand for? [duplicate]
- How do I convert a String to an int in Java?
- How can I generate a rainbow circle using HTML5 canvas?
- What does Java option -Xmx stand for? [duplicate]
- What’s the difference between “{}” and “[]” while declaring a JavaScript array?
- Is there an invisible character that is not regarded as whitespace?
- What does “javascript:void(0)” mean?
- Problem with gif with transparent background
- For-each over an array in JavaScript
- Finding white rectangle in an image
- How to delete a cookie?
- 1000 * 60 * 60 * 24 * 30 results in a negative number [duplicate]
- How to convert nanoseconds to seconds using the TimeUnit enum?
- Search for words with telephone numbers from 2-3-4 tree
- What is TypeScript and why would I use it in place of JavaScript? [closed]
- How do you use the ? : (conditional) operator in JavaScript?
- Which equals operator (== vs ===) should be used in JavaScript comparisons?
- are there dictionaries in javascript like python?
- How to do associative array/hashing in JavaScript
- How to make a discord bot create an invite for every server it joins?
- Using or ‘|’ in regex [duplicate]
- How to format strings in Java
- What is the difference between x86 and x64
- && (AND) and || (OR) in IF statements
- ES6 Map in Typescript
- How to use the toString method in Java?
- What is a NullPointerException, and how do I fix it?
- What exactly is Apache Camel?
- addEventListener vs onclick
- Unable to find valid certification path to requested target – error even after cert imported
- Unable to find valid certification path to requested target – error even after cert imported
- What is the equivalent of the C++ Pair
in Java? - Java – Convert integer to string [duplicate]
- Getting random numbers in Java [duplicate]
- What is an instance variable in Java?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- “Uncaught SyntaxError: Cannot use import statement outside a module” when importing ECMAScript 6
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- How do I check if an array includes a value in JavaScript?
- Java: “error: cannot find symbol”
- JavaScript document.getElementById().value logs empty value
- How do I color a hexagonal grid such that it doesn’t have neighbors of the same color?
- How to format a JavaScript date
- How does the Java ‘for each’ loop work?
- What does href expression do?