Results 1 to 12 of 12
  1. #1
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Default I want a game to be a excutable jar file.

    Ok I have made this really simple tic tac toe game and want to run it in an excutable jar file. I have made it into a jar file problem is is that when I run it it doesn't run. Plz help.
    Attached Thumbnails Attached Thumbnails I want a game to be a excutable jar file.-capture.png  

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: I want a game to be a excutable jar file.

    Your problem description isn't nearly enough for anyone to offer pointed help. However, see if you can find out what might be wrong: Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)

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

  3. #3
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,368
    Rep Power
    6

    Default Re: I want a game to be a excutable jar file.

    probably the jar isn't executable then. Try this:

    - open a command prompt and 'cd' to where your jar is (I hope you know how to use a command prompt)
    - execute java -jar tictactoe.jar

    What error do you get when you try that?

    Further research you can do:

    - open up the jar in your favorite zip tool. What do you see?
    - open up the META-INF/manifest.mf file in a text editor. What does it contain?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default Re: I want a game to be a excutable jar file.

    The image icons for that array are not in a resources folder of the java project.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Default Re: I want a game to be a excutable jar file.

    Quote Originally Posted by gimbal2 View Post
    probably the jar isn't executable then. Try this:

    - open a command prompt and 'cd' to where your jar is (I hope you know how to use a command prompt)
    - execute java -jar tictactoe.jar

    What error do you get when you try that?

    Further research you can do:

    - open up the jar in your favorite zip tool. What do you see?
    - open up the META-INF/manifest.mf file in a text editor. What does it contain?

    Well what is it supposed to say or have in it.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: I want a game to be a excutable jar file.

    You first. what does it say or have in it?

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

  7. #7
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Default Re: I want a game to be a excutable jar file.

    Quote Originally Posted by DarrylBurke View Post
    You first. what does it say or have in it?

    db
    This is what it has in it.
    Attached Thumbnails Attached Thumbnails I want a game to be a excutable jar file.-ticktacktoejarfile.png   I want a game to be a excutable jar file.-metainf.png  

  8. #8
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,368
    Rep Power
    6

    Default Re: I want a game to be a excutable jar file.

    There is not even a .class file in there. No wonder it doesn't work.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Default Re: I want a game to be a excutable jar file.

    Well i've taken plenty of other games and done the same is it because this one is a JApplet and it needs to be done a different way?

  10. #10
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,368
    Rep Power
    6

    Default Re: I want a game to be a excutable jar file.

    You don't see how not having any .class file in the jar is a problem?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  11. #11
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Default Re: I want a game to be a excutable jar file.

    I'm not here to argue I'm here to learn and get answers.

  12. #12
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,099
    Rep Power
    4

    Default Re: I want a game to be a excutable jar file.

    Quote Originally Posted by Mikhail Bjornson View Post
    I'm not here to argue I'm here to learn and get answers.
    You *are* getting anwsers. However, you are not learning though. Like Erik says: THERE ARE NO CLASSES IN THE JAR FILE. Check the way you make your jar file, whether it includes the .class files.

Similar Threads

  1. Exporting to an Excutable Jar
    By KeyLay in forum New To Java
    Replies: 16
    Last Post: 11-29-2011, 03:24 AM
  2. making excutable with visual cafe
    By robbierut in forum New To Java
    Replies: 3
    Last Post: 12-21-2010, 12:24 PM
  3. Database With netbeans excutable jar
    By amitabh in forum NetBeans
    Replies: 2
    Last Post: 06-02-2010, 02:52 PM
  4. [SOLVED] creating excutable jar file
    By sandeepsai39 in forum New To Java
    Replies: 2
    Last Post: 02-25-2009, 08:43 AM
  5. [SOLVED] Making JAVA Program excutable
    By kirly in forum Advanced Java
    Replies: 10
    Last Post: 10-07-2008, 04:57 AM

Posting Permissions

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