Results 1 to 6 of 6
  1. #1
    Jagdeesh123 is offline Member
    Join Date
    Nov 2010
    Posts
    9
    Rep Power
    0

    Default unable to run a jar file.

    unable to run a jar file.
    i used this command :

    java -jar C.java

    I got the following error:
    Fail to load Main-Class manifest attribute from c.jar

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Quote Originally Posted by Jagdeesh123 View Post
    unable to run a jar file.
    i used this command :

    java -jar C.java

    I got the following error:
    Fail to load Main-Class manifest attribute from c.jar

    Really?

    Copy, paste and post the command together with the entire output you get from the runtime.

  3. #3
    Jagdeesh123 is offline Member
    Join Date
    Nov 2010
    Posts
    9
    Rep Power
    0

    Default unable to run jar file

    c:\>java -jar C.java
    Fail to load Main-Class manifest attribute from c.jar
    c:\>

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    I can't in all honesty say that that didn't happen. (You can name jar files whatever you like, and they can contain a main class which prints an ungrammatical one line version of something approximating a runtime error message.) But I will say that I don't believe it did happen.

  5. #5
    demonick is offline Member
    Join Date
    Dec 2010
    Posts
    27
    Rep Power
    0

    Default

    You can always look at contents of manifest file, if it has a Main-Class attribute set, if it isn't generated by IDE.

  6. #6
    kubus_ is offline Member
    Join Date
    Dec 2010
    Posts
    4
    Rep Power
    0

    Default

    Jagdeesh123 post your code, because it's rather code bug than a real-system-deal

Similar Threads

  1. Problem with JXL: unable to read GSEA xls file
    By angeloulivieri in forum Advanced Java
    Replies: 3
    Last Post: 05-10-2010, 12:53 PM
  2. Unable to Print more than 1 File
    By satyam000 in forum Networking
    Replies: 1
    Last Post: 11-24-2009, 07:25 AM
  3. Unable to Print more than 1 File
    By satyam000 in forum AWT / Swing
    Replies: 5
    Last Post: 11-24-2009, 05:59 AM
  4. Unable to access velocity.properties file from jar file
    By mjwoodford in forum New To Java
    Replies: 0
    Last Post: 10-09-2009, 01:46 PM
  5. Replies: 1
    Last Post: 06-19-2009, 10:47 AM

Tags for this Thread

Posting Permissions

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