Your classpath declaration is bad. "$JETTY_HOME/lib/annotations;$JETTY_HOME/lib;$JETTY_HOME/lib/apache-jsp;$JETTY_HOME/lib/jaspi;$JETTY_HOME/lib/logging;./"
That style of definition (where the entry ends in a slash) is for unpacked jars, which you don't have. Also you cannot include in your classpath ALL jars shipped from Jetty, as that's a nonsense configuration. There's specific jars for specific functionality, and you cannot have all of them at the same time present in your classpath. Start with the limited list of jars your maven project is using, no more, no less. Your classpath should contain all of the jars individually listed. (eg: $JETTY_HOME/lib/jetty-server-11.0.9.jar;$JETTY_HOME/lib/jetty-io-11.0.9.jar;... etc) Joakim Erdfelt / joa...@webtide.com On Sat, Jun 4, 2022 at 7:10 AM Kelly Wiles <rkwi...@twc.com> wrote: > Hi, > > I have been looking for several days now this answer. > > I develop on Windows 11 using Eclipse IDE and then I create a jar file > using the install goal with the run configuration. This does create a > jar file in the target directory. > > I then copy the jar file to a Linux system, this system has jdk 11 > installed and jetty 11.0.9 installed. I unpacked jetty into my home > directory and set the JETTY_HOME to point to it. > > When I use the following command to run it. > > java -cp > "$JETTY_HOME/lib/annotations;$JETTY_HOME/lib;$JETTY_HOME/lib/apache-jsp;$JETTY_HOME/lib/jaspi;$JETTY_HOME/lib/logging;./" > > -jar agilemesh.dronevideo-1.0.0.jar > > This returns the following error. > > Error: Unable to initialize main class agilemesh.dronevideo.DroneVideo > Caused by: java.lang.NoClassDefFoundError: > org/eclipse/jetty/server/HandlerContainer > > The jetty-server-11.0.9.jar file exists in $JETTY_HOME/lib and contains > the HandlerContainer class, so I am lost as to why I get this error. > > Thanks > > Kelly > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > _______________________________________________ > jetty-users mailing list > jetty-users@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list jetty-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users