• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Maven - ClassNotFoundException

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may be a simple Java ClassNotFoundException rather than Maven but I can't spot it.

Thank you for any help.

I'm following 'Maven - The Definitive Guide' page 54.

Step 1 :



Step 2 :



Step 3 :


Step 4 :





 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forgot to mention : %CLASSPATH% contains C:\ch-custom\simple-weather\target\classes
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are using the Exec plugin. You need to post the entire definition of that plugin from your pom.xml file (Maven - The Definitive Guide, page 54, doesn't show the Exec plugin being used). Apparently, you didn't set the classpath, or you used the wrong target (you should be using exec:java, not exec:exec).

Also, "The Definitive Guide" has be superceeded by "The Complete Reference": http://www.sonatype.com/books/mvnref-book/reference/
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Graeme Byers wrote:Forgot to mention : %CLASSPATH% contains C:\ch-custom\simple-weather\target\classes


Never set CLASSPATH, that's a sure way to get yourself into trouble because you will at some point accidentally pick up the wrong class file. Besides, you should not have to do that when using Maven.
 
Oh the stink of it! Smell my tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic