0

How do I set an entry point to my generated war file? Here is my Manifest file

Manifest-Version: 1.0
Main-Class: Test

with Package name:

Manifest-Version: 1.0
Main-Class: com.process.Test

When I deploy it and try to run it from cmd using : java -jar myFile.war

I get :

NoClassDefFoundError: Test   

regardless of whether I specify a package name with the main class.

Thanks in advance :)

Fabii
  • 3,820
  • 14
  • 51
  • 92

1 Answers1

0

Does your class have no package? Try specyfing it as:

Main-Class: com.maventest.Test
Majki
  • 618
  • 7
  • 14
  • yes it does have a package? I 've tried with : com.process.Test and it still gives the same error. – Fabii May 16 '12 at 21:07
  • And is it war or jar? War is for web applications, while jar is for general java programs/libraries. And how do you build your jar? With maven? – Majki May 16 '12 at 21:12