Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 13 of 13

Thread: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

  1. #1
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Exclamation Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    I've made many jars in the past and i keep having the same problem!

    http://uppit.com/k040f20m1d6f/client.jar

    Error: could not find the main class: client.class Program will exit.

    This jar working for me, why wont it work for anyone else?

    [Question: Can it be because me jdk is Complete Up to date?]
    Last edited by Java Programmer; February 15th, 2012 at 06:38 PM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    No. Where is client.class? Is it in the jar? Or is it only on your machine?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    Error: could not find the main class: client.class
    Is your class name: client.class or is it client? Client.class looks like a filename, not a class name..
    If it were named client.class then the name of the class file would be: class.class and it would be in the client package.
    Remove the .class from where you are specifying the class name.

  4. #4
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    The client file is uploadd into the jar file, ive mad jar files with command line and have gotten same problem, this time i used a 'jarmaker' and have the same problem, and the error has no .class, my friend typed it wrong when he sent it to me.

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    This jar working for me, why wont it work for anyone else?
    Try openning a command prompt and issuing the java command:
    java -jar client.jar

    Then copy the command prompt console with the error message.
    On Windows: To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.

    What version of java did you compile it with?
    What version of java is on the machine where it fails?

  6. #6
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    .-. I DON'T GET A ERROR WORKS 100% FOR ME!
    JDK 1.7.0_02
    Not Sure. Works with other computers with JDK 1.7.0_02

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    What version of java is on the machine where it fails?

  8. #8
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    "Not Sure. Works with other computers with JDK 1.7.0_02 "

  9. #9
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    Ah, sec ill ask him..

  10. #10
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    JRE7
    JDK1.6.0_25

  11. #11
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    What version of the java.exe program is executed when the error happens?

  12. #12
    Member
    Join Date
    Jan 2012
    Posts
    107
    My Mood
    Grumpy
    Thanks
    6
    Thanked 2 Times in 1 Post

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    Anything below.

  13. #13
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Jar not WORKING FOR ANYONE BUT ME!!!!!!!! HELP

    good enough

Similar Threads

  1. not sure why the 'else is not working
    By reddevilggg in forum Loops & Control Statements
    Replies: 3
    Last Post: September 30th, 2011, 03:54 PM
  2. [SOLVED] Working on Win 7 and not on XP
    By shaumux in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 4th, 2011, 05:36 PM
  3. Why isn't this working?
    By javapenguin in forum What's Wrong With My Code?
    Replies: 14
    Last Post: January 21st, 2011, 04:08 PM
  4. Cannot seem to get this working
    By OttawaGuy in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 28th, 2010, 03:41 PM
  5. Replies: 4
    Last Post: January 27th, 2009, 12:03 AM