Results 1 to 3 of 3
  1. #1
    silvia is offline Member
    Join Date
    Jul 2007
    Posts
    35
    Rep Power
    0

    Default Error: Could Not Find Main Class. Program Will Exit

    A Friend Of Mine Made A .jar File
    But Hes Not in Contact With Me Since Long Time. I Edit His .jar File Using Winzip unzippin it n again packing it ....
    But After Editing That File i Cant Run It.

    this error comes

    Could Not Find Main Class. Program Will Exit

    have he done some type of security ? that no1 can edit it ?
    im so confused because even if i dont change anything in those .class file just save it .. the .jar Gives That error
    Thanks

  2. #2
    cruxblack is offline Senior Member
    Join Date
    Jul 2007
    Posts
    130
    Rep Power
    0

    Default

    i presume when u said u run da jar file meaning u double click da jar file n it gives da "Could Not Find Main Class" message?

    have u made the manifest file (.mf) and packed it together inside da jar with the rest of ur .class files?

    Da manifest file are used to tell the computer what .class should be used when u click da .jar file, .jar dun really work like .exe files, maybe thats da problem :p

  3. #3
    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0

    Default Re: Error: Could Not Find Main Class. Program Will Exit

    This will surely help.....

    I recommend you download Blue J. its free and will let you JAR your file from within its interface without the need of command prompt. you just load up your classes into blue j and select "create JAR" or something similar (not using blue j right now) and you choose which main method (if you have more than one) you would like to execute primarily.

Similar Threads

  1. Could not find the main class, program will exit.
    By aryubi in forum New To Java
    Replies: 39
    Last Post: 02-19-2010, 10:02 AM
  2. cannot find symbol class error
    By po0oker in forum New To Java
    Replies: 5
    Last Post: 10-31-2007, 02:52 PM
  3. Replies: 1
    Last Post: 08-07-2007, 07:10 AM
  4. problems to find the main method
    By christina in forum Eclipse
    Replies: 2
    Last Post: 08-06-2007, 07:51 PM
  5. How to exit the program..
    By coco in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 05:56 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
  •