add this to pom <addClasspath>true</addClasspath> this line--> <classpathPrefix>dependency/</classpathPrefix> <mainClass>org.apache.camel.spring.Main</mainClass>
and then do only: java -jar myDSLRoute-1.0-SNAPSHOT.jar Bilgin On 22 February 2012 01:39, newbiee <m_ess...@hotmail.com> wrote: > Thanks Bilgin. > > I added the followig in my POM file: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <version>2.4</version> > <configuration> > <archive> > <manifest> > <addClasspath>true</addClasspath> > > <mainClass>org.apache.camel.spring.Main</mainClass> > </manifest> > </archive> > </configuration> > </plugin> > > When I apply the following command to run the program: > > java -cp dependency/*; -jar myDSLRoute-1.0-SNAPSHOT.jar > > I am getting the following error: > > "Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/camel/spring/Main" > > Not sure why Main class is missing even though I have updated the POM file. > > Please let me what is missing. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Spring-DSL-route-tp5503528p5503885.html > Sent from the Camel - Users mailing list archive at Nabble.com. >