This will happen when you doubleclick a JAR file in Windows explorer, but the JAR is by itself actually not an executable JAR. A real executable JAR should have at least a class with a main()
method and have it referenced in MANIFEST.MF
.
In Eclispe, you need to export the project as Runnable JAR file instead of as JAR file to get a real executable JAR.
Or, if your JAR is solely a container of a bunch of closely related classes (a library), then you shouldn’t doubleclick it, but open it using some ZIP tool. Windows explorer namely by default associates JAR files with java.exe
, which won’t work for those kind of libary JARs.
Related Posts:
- Failed to write core dump. minidumps are not enabled by default on client version of windows
- Eclipse “Error: Could not find or load main class”
- Access restriction: The type ‘Application’ is not API (restriction on required library rt.jar)
- Failed to load the JNI shared Library (JDK)
- How to import a jar in Eclipse
- java ‘jar’ is not recognized as an internal or external command
- How to uninstall Eclipse?
- Eclipse/Maven error: “No compiler is provided in this environment”
- Can’t start Eclipse – Java was started but returned exit code=13
- Can’t start Eclipse – Java was started but returned exit code=13
- What causes “Unable to access jarfile” error?
- Is there a way to convert all comments into javadoc comments? [Eclipse/Java]
- Can’t execute jar- file: “no main manifest attribute”
- Can’t execute jar- file: “no main manifest attribute”
- “Javac” doesn’t work correctly on Windows 10
- How to uninstall Eclipse?
- Editor does not contain a main type in Eclipse [duplicate]
- Running JAR file on Windows
- Editor does not contain a main type in Eclipse [duplicate]
- JRE Missing when installing eclipse
- Running JAR file on Windows 10
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Server Tomcat v9.0 Server at localhost failed to start
- How can I convert a .jar to an .exe?
- javac not working in windows command prompt
- JVM Crash – “EXCEPTION_ACCESS_VIOLATION”
- what does Dead Code mean under Eclipse IDE Problems Section
- Eclipse: Java was started but returned error code=13
- How to decompile a whole Jar file?
- Extracting .jar file with command line
- Server Tomcat v9.0 Server at localhost failed to start
- “A java exception has occurred” when opening .jar
- How to change a package name in Eclipse?
- what is this ANT build?
- Error: Selection does not contain a main type
- What causes java.lang.IncompatibleClassChangeError?
- Extracting .jar file with command line
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- Cannot change version of project facet Dynamic Web Module to 3.0?
- “Could not find Java SE Runtime Environment.” after installing Java
- Eclipse does not start when I run the exe?
- The declared package does not match the expected package “”
- eclipse won’t start – no java virtual machine was found
- Eclipse Java error: This selection cannot be launched and there are no recent launches
- How can I avoid this Ant Build error?
- Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
- Java and Windows – error: illegal escape character
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- How can I convert a .jar to an .exe?
- Eclipse error, “The selection cannot be launched, and there are no recent launches”
- channel 3: open failed: connect failed: Connection refused
- Java can’t find file when running through Eclipse
- Eclipse java debugging: source not found
- No appenders could be found for logger(log4j)?
- Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
- “The public type <
> must be defined in its own file” error in Eclipse [duplicate] - Installing WindowBuilder on Eclipse Neon
- The import javafx cannot be resolved
- What is the jasperrepots-fonts jar for and how to use it?
- Fatal error compiling: tools.jar not found:
- Unreachable code in eclipse
- Java project in Eclipse: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- “The import org.springframework cannot be resolved.”
- Node cannot be resolved to a type
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- Resource leak: ‘in’ is never closed
- Android Emulator: Unfortunately App has stopped
- implicit super constructor object() is undefined. must explicitly invoke another constructor
- Cannot be resolved to a variable error in Eclipse
- Using JavaFX in JRE 8, “Access restriction” error
- ‘No JUnit tests found’ in Eclipse
- Resolving File paths – ‘File not found’ error in Eclipse
- Error: Could not find or load main class net.minecraft.launchwrapper.Launch when launching Minecraft 1.12.2 with Forge
- Eclipse is executing the wrong Java file
- Eclipse: JVM terminated. Exit code=2
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- Unknown version of Tomcat was specified in Eclipse
- Which Eclipse IDE version to choose?
- Difference between jar and war in Java
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- How can i fix this equals on primitive type(int)
- A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- The import org.junit cannot be resolved
- Wrong project is being run in Eclipse
- How fix Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
- Maven dependency update on commandline
- The import javax.servlet can’t be resolved
- Where can I download the jar for org.apache.http package?
- How to enable the Java keyword assert in Eclipse program-wise?
- Why “no projects found to import”?
- Error message ‘Cannot be resolved or is not a field’
- Could not find or load main class with a Jar File
- Can’t load IA 32-bit .dll on a AMD 64-bit platform
- How do I enable index downloads in Eclipse for Maven dependency search?
- Java error no lwjgl64 in path?
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- Eclipse message saying List cannot be resolved to a type