On Wed, Jul 20, 2011 at 1:27 PM, Sebastian Otaegui <[email protected]> wrote: > The issue is not related to javax.mail it is with the specification of your > main class. > > In mainClass you have to put the fully qualified path to the class > > like in <mainClass>pa.cka.ge.ANNEX</mainClass> (if that is your main class) > > And if you require javax.mail you will have to add it to the class path when > you execute it > > something like: > > java -cp mail.jar -jar ANNEX.jar
As Sebastian notes, your mainClass is probably wrong. A standard rule is to never use classes that don't have a package - too many things go wrong. You've got Maven to set the ClassPath entry in the Manifest, see http://maven.apache.org/shared/maven-archiver/examples/classpath.html But you also need to get copies of dependent libraries, see http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html You probably want to create an assembly that has your main jar, its dependencies, and any config files (log4j, etc) see http://maven.apache.org/plugins/maven-assembly-plugin/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
