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?
- Cross-Origin Read Blocking (CORB)
- “Char cannot be dereferenced” error
- How can I remove a specific item from an array?
- Explanation on Integer.MAX_VALUE and Integer.MIN_VALUE to find min and max value in an array
- javax vs java package
- How can I refresh a page with jQuery?
- “Missing return statement” within if / for / while
- How to convert byte array to string and vice versa?
- good example of Javadoc
- How can I create a two dimensional array in JavaScript?
- “java.lang.OutOfMemoryError : unable to create new native Thread”
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- Pure JavaScript: a function like jQuery’s isNumeric()
- jquery SlideToggle effect in upward direction?
- Environment variable to control java.io.tmpdir?
- Java Undefined Object
- Deleting array elements in JavaScript – delete vs splice
- Node.js Error: connect ECONNREFUSED
- How to move an element into another element?
- How to move all HTML element children to another parent using JavaScript?
- Why is this jQuery click function not working?
- Java Embedding Into HTML
- Cannot resolve symbol ‘context’
- Simple average function in Javascript
- Address already in use: JVM_Bind java
- How do I make a discord bot join a voice channel?
- How to display raw JSON data on a HTML page
- java.lang.ClassNotFoundException:com.mysql.jdbc.Driver [duplicate]
- How can I check if a value is of type Integer?
- Append a single character to a string or char array in java?
- Getting a random value from a JavaScript array
- Moment Js UTC to Local Time
- Get the size of the screen, current web page and browser window
- Java printf formatting to print items in a table or columns
- String cannot be resolved to a type – Java RAD
- Simple timeout in java
- How do I concatenate a string with a variable?
- Eclipse message saying List cannot be resolved to a type
- setTimeout callback argument
- conditional layout based on if Innerblocks is not empty
- Only loads on the contact template page
- esc_js() breaks unicode sequences by removing the slash ‘\’ character
- Why does a on Comment edit page submit the page?
- TinyMCE Javascript URL Question
- how to prevent added meta box from being injected with style=”position: fixed; top: 56px;” at scroll down