How-to articles, tricks, and solutions about JAR
Can't execute jar- file: "no main manifest attribute"
The "no main manifest attribute" error is usually caused by a missing or incorrect Main-Class attribute in the manifest file of a Java .jar file.
Eclipse "Error: Could not find or load main class"
If you are seeing an error message that says "Error: Could not find or load main class", it is likely that there is a problem with the classpath for your project.
Eclipse error: "The import XXX cannot be resolved"
If you get the error "The import XXX cannot be resolved" in Eclipse, it means that the class or package that you are trying to import cannot be found in the classpath of your project.
Extract source code from .jar file
To extract the source code from a .jar file, you can use a decompiler such as JD-GUI or Cavaj Java Decompiler.
How can I edit a .jar file?
A .jar file is a Java Archive file that contains compiled Java code and resources (such as images, sounds, etc.) that can be used by Java applications.
How to build JARs from IntelliJ properly?
To build a JAR (Java Archive) file from IntelliJ IDEA, you need to follow these steps:
How to decompile a whole Jar file?
To decompile a JAR file, you can use a Java decompiler such as JD-GUI.
How to get the path of a running JAR file?
To get the path of a running JAR file, you can use the java.lang.Class class's getProtectionDomain method and then the getCodeSource method.