Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Failed to load Main-Class manifest attribute"



Mieke Banderas wrote:

>So no main then I suppose. I kinda expected OS X to support mainclassless
>jars, if those are allowed on other platforms. Is a main class mandatory
>with the Hotspot JVM that OS X use?

No JVM can possibly run a class unless it knows its name.  That name is
either in the jar's manifest, in a runnable script, or in the software's
documentation.  If the name is only given in the documentation, then you
have to type in the right name, after reading the documentation.

The only practical way a jar could be mainclassless is if it's a library
jar for another program.  Then that other program would have a main class.

A jar might contain a main class, but that class might not be listed as the
main-class in the manifest.  The result is a jar that's not
double-clickable.  That could be a conscious choice by the developer, or a
bug, or mere ignorance of double-clickable jars.

Whatever the reason for the jar being mainclassless, you'll have to ask the
developer, or read the fine manual that accompanies the software.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.