Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B7C4F527 for ; Tue, 13 Aug 2013 10:02:06 +0000 (UTC) Received: (qmail 85228 invoked by uid 500); 13 Aug 2013 10:02:03 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 84549 invoked by uid 500); 13 Aug 2013 10:01:52 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 84535 invoked by uid 99); 13 Aug 2013 10:01:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Aug 2013 10:01:50 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of jarlathreidy@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Aug 2013 10:01:45 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1V9BPo-0008RP-Ro for users@maven.apache.org; Tue, 13 Aug 2013 03:01:24 -0700 Date: Tue, 13 Aug 2013 03:01:24 -0700 (PDT) From: TenLeftFingers To: users@maven.apache.org Message-ID: <1376388084813-5767544.post@n5.nabble.com> Subject: Sonatype tutorial has an error? I can't execute the basic jar. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org >From the sonatype introduction to Maven (http://books.sonatype.com/mvnex-book/reference/simple-project-sect-create-simple.html), I've built a project following the instructions exactly. When I issue the command: java -cp target/simple-1.0-SNAPSHOT.jar org.sonatype.mavenbook.App I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: org/sonatype/mavenbook/App Caused by: java.lang.ClassNotFoundException: org.sonatype.mavenbook.App at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.sonatype.mavenbook.App. Program will exit. The project was created successfully: mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple \ -DartifactId=simple \ -Dpackage=org.sonatype.mavenbook \ -Dversion=1.0-SNAPSHOT and built: $cd simple $mvn install What can be wrong with my java command that causes this exception? (the .java file is present as is the .jar) so what can be the problem with the java command? -- View this message in context: http://maven.40175.n5.nabble.com/Sonatype-tutorial-has-an-error-I-can-t-execute-the-basic-jar-tp5767544.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org