


Once export the jar file, use the below command to execute. In Java launch configuration, choose your main class. –> This is for the validation that JAR file will have the entry point to the main class.Īfter this, export your Java Dynamic project as “Runnable JAR” file and not JAR file. I spend lot of time to find the fix.ġ.Try restart the Eclipse (if you are using Eclipse to built JAR file) –> Actually this helped my issue in exporting the JAR file properly.Ģ.After eclipse restart, try to see if your eclipse is able to recognize the main class/method by your Java project –> right click –> Run as –> Run configurations –> Main –> click Search button to see if your eclipse is able to lookup for your main class in the JAR file. I faced the same issue and it’s fixed now:) Just follow the below steps and the error could be for anything, but the below steps makes the process smoother.
#Jgrasp no main methods found full
Note that this is only the plugin definition, not the full pom.xml: jar įor Maven, something like the following snippet should do the trick. Note that there are several ways to get this done either with the CLI, Maven or Ant:įor CLI, the following command will do: (tks jar cmvf META-INF/MANIFEST.MF. Where 圜lass is the class holding the public static void main(String args) entry point. The file itself should have (at least) this one liner: Main-Class: 圜lass Second, to make a jar executable… you need to jar a file called META-INF/MANIFEST.MF First, it’s kind of weird, to see you run java -jar "app" and not java -jar app.jar
