• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Failed to load Main-class manifest attribute

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i'm facing a problem while including a jar file in my class path.When i try to do the same an error is prompted telling "Failed to load Main-class manifest attribute from *.jar".Hence i'm getting errors on compiling a file that need these class files in the Jar.But on echoing the classpath i do see that these jar files are present in the classpath..Really confused.Can anyone help me out??
 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As no one else is answering this ;-)

I really would need to see the command you are executing and the jar , class path , as its a little confusing as to what you intended and therefore as to what has gone wrong... but did you actually want to define a main class in the jar.

It almost sounds like you are using java with the -jar option when you didn't want to use a jar in this way i.e. you just wanted the jar to be on the classpath i.e using -cp -classpath.

The error means you have told java that you wish to execute one jar file (with possibly others on the classpath) when you execute java in this way it opens the manifest looks for the line that defines the main class and then attempts to load it from the jar in your case its failing to find it. Your not trying to execute one jar but have the main class specified in another jar ??

You mention compiling which is the javac command I wasn't aware that could give the error mentioned ... any one ??
 
Sangitha Padmanaban
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi chris,

I worked on it and got it resolved.The problem was in the class file in class file that was in the included jar file.Thnk you
 
reply
    Bookmark Topic Watch Topic
  • New Topic