java - Cannot find or load main class from .jar file -
So I wrote a project in Eclipse and it works fine when I click on the green run button . When I export it in a jar and I double click on it, a quick command prompt appears, "The main square can not be found or loaded ...". I tried everything to try to rename the registry keys, reinstall Java, change the environment variable and definitely turn it on and off. I read all the threads on the stack and tried whatever they suggested. Here is my manifest file:
manifest-version: 1.0 class-path:. Main category: Main. Main
My main square is in the package named main.
- I have the package name in something other than
main
- Do not forget to create a run configuration, which specifies the name of your main square.
- Pack all related other jar files in one package. Run
- executable.jar as
java -jar yourExecutable.Jar
and if it does not resolve your problem, Then see my MANIFEST.MF file in your executable jar file. Maybe it can give you some clue
manifest-version: 1.0 rrc-class-path: ./ concurrent linkmash-laroo-1.2.jsarlf4jpi-1.7 5.jar org.simpleframework.jar openflowj-0.3.7-SNAPSHOT.jar Mogo-Java-driver-2.1.1.2.jar Neti-3.9.0.final Zagaria-15.0.jor org.restlet.e xt.jackson .jar logback-classic-1.0.13.jpg add-time -2.2.jar org.codeh aus.jackson.core.jar org.codehaus.jackson.mapper.jar Openflows- 0.3.7-SNAPSHOT-source.or ORG Restlet.jar logback-core-1.0.13.jar org.rest let.ext.slf4j.jar org.restlet.ext.simple.jar openflowj-0.3.7-SNAPSHOT -Javaadocker class-path :. RRC-Main-Class: etri.sdn.controller.Main Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Comments
Post a Comment