I've looked at the other stackoverflow questions regarding this issue and those questions and answers relate to the improper main class setting in the pom.xml. I've written the main class to have the correct package name and proper case sensitivity but whenever i run my jar I get the error of Could not find or load main class
.
I added the project to github: https://github.com/quicksilversly/maze and my maven jar plugin configuration looks like this:
configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.willisjtc.maze.VertxStarter</mainClass>
</manifest>
</archive>
</configuration>
And here is my main class:
package com.willisjtc.maze;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class VertxStarter extends AbstractVerticle {
private static final Logger logger = LogManager.getLogger(VertxStarter.class);
public static void main(String... args) {
Vertx vertx = Vertx.vertx();
vertx.deployVerticle("ruby/webVerticle.rb");
vertx.deployVerticle("ruby/mazeVerticle.rb");
}
}
This is what I am getting when I run java tvf target/jar-to-run.jar
:
597 Sat Aug 06 21:59:54 MDT 2016 META-INF/MANIFEST.MF
0 Sat Aug 06 21:59:54 MDT 2016 META-INF/
0 Sat Aug 06 21:43:12 MDT 2016 com/
0 Sat Aug 06 21:43:12 MDT 2016 com/willisjtc/
0 Sat Aug 06 21:43:12 MDT 2016 com/willisjtc/maze/
0 Sat Aug 06 21:43:18 MDT 2016 META-INF/maven/
0 Sat Aug 06 21:43:18 MDT 2016 META-INF/maven/com.willisjtc/
0 Sat Aug 06 21:43:18 MDT 2016 META-INF/maven/com.willisjtc/maze/
0 Sat Aug 06 21:43:10 MDT 2016 ruby/
907 Sat Aug 06 21:43:12 MDT 2016 com/willisjtc/maze/VertxStarter.class
220 Sat Aug 06 21:56:14 MDT 2016 META-INF/maven/com.willisjtc/maze/pom.properties
2105 Sat Aug 06 21:56:14 MDT 2016 META-INF/maven/com.willisjtc/maze/pom.xml
137 Sat Aug 06 21:43:10 MDT 2016 ruby/mazeVerticle.rb
221 Sat Aug 06 21:43:10 MDT 2016 ruby/webVerticle.rb
So my main class is there as expected.
What do i need to change in order to run my jar file?