Results 1 to 3 of 3
  1. #1
    xxd3d is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default Failed to load main class

    I'm not a java coder.

    So what happens is an error message pops up titled "Java Virtual Machine Launcher" and in it contains "Failed to load Main-Class manifest attribute from C:Users\Administrator\Downloads\ContractOut.jar".

    This is a client my friend posted on these forums. It appears to work for everyone else, but me.

    My operating system is Windows 7 running on 64-bit. I installed both 64/32bit java at first, then uninstalled both just to try 32 alone, then 64 alone; but I still encounter the same message. Is there anyway I can fix this problem?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: Failed to load main class

    I'm not a java coder.
    So, really, this is a problem for your friend.

    I don't say this to be unhelpful (on the contrary!) but getting the html and jar files to cooperate and the applet to show are part of writing the code in the first place: so that it is *robust* rather than just wroking. It generally requires closely reading something like Oracle's Tutorial (the sections on applets and deploying) as well as a certain amount of swearing. Or so I've found.

    What you can do to help is to describe to your friend the context (OS, java runtime, location of the files) within which the problem occurs. To get help here even more information would be useful, like the code being run and contents of the jar's manifest. The usual approach is to create a really small, simple applet (such as can be posted here and run by others) that also shows this problem when deployed.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Failed to load main class

    Failed to load Main-Class manifest attribute
    Executable jars are created for applications, not for applets. Ask your friend how you should be using his program. Certainly not by double-clicking the file.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 10
    Last Post: 02-02-2012, 08:26 PM
  2. Replies: 3
    Last Post: 12-09-2011, 03:51 AM
  3. Replies: 5
    Last Post: 09-16-2011, 07:01 AM
  4. Error: Could not find or load main class
    By ITSlave in forum New To Java
    Replies: 4
    Last Post: 09-15-2011, 09:47 AM
  5. Could not find or load main class BubbleSort.class
    By blaqkout in forum New To Java
    Replies: 5
    Last Post: 09-12-2011, 07:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts