I run the command again with -cp parameter,but got a different error??
do you have any clue about it?

Regards,
Jason
**********************
C:\my-apps\genapp>java -cp tartget\test-application-1.0.jar mdn.testapp.App;
Exception in thread "main" java.lang.NoClassDefFoundError: mdn/testapp/App;

-----Original Message-----
From: Gisbert Amm [mailto:[EMAIL PROTECTED]
Sent: 23 January 2006 10:22
To: Maven Users List
Subject: Re: Exception in thread "main" java.lang.NoClassDefFoundError:
????


Setting the classpath could also help:

C:\my-apps\genapp\test-app>java -cp target\test-app-1.0.jar mdn.testapp.App

Regards,
Gisbert Amm

Gisbert Amm wrote:
> You probably want to set the maven.jar.mainclass attribute to get the 
> main class entry written to the jar manifest file. See
> http://maven.apache.org/maven-1.x/reference/plugins/jar/properties.html
> 

Here you would call the jar directly:

C:\my-apps\genapp\test-app>java jar target\test-app-1.0.jar

> 
>> Hi,
>> I experienced an exception Error while executing the App class of my
>> project.
>> Could any body give some advice? where is the fault?
>>
>> Regards,
>> Jason
>>
>> ******************************** 1.Run maven genapp to execute genapp 
>> goal to create a new project;
>> 2.execute jar goal with maven jar;
>> 3.execute App class with >java tartget\test-application-1.0.jar
>> mdn.testapp.App;
>>
>> Error message from console:
>> C:\my-apps\genapp\test-app>java target\test-app-1.0.jar mdn.testapp.App
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> target\test-app-1/0/jar
>>
>> The expect result is: "Hello world!" displaying in console.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to