Java Game- Game can't find it's graphics jar file

Discussion in 'Java' started by BlackHawke, Jan 21, 2004.

  1. BlackHawke

    BlackHawke Guest

    My name is Nick Soutter, I own a small game development company
    (www.aepoxgames.net) making our first game (www.andromedaonline.net) in
    java.



    I am writing because we are having a very serious problem, and I was hoping
    someone might have thoughts.



    Our game has 2 main programs- one is an updater, the other is the game
    client. The updater (AndromedaOnline.jar) checks for updates to the
    graphics, sound, client, and of course itself. After applying any updates,
    the updater runs the client (AndromedaClient.jar) for people to play with.



    When players install this program on their systems with pre-existing
    versions of JAVA, it runs fine. When they try to install it after installing
    a fresh, new Java JRE, however, it fails.



    I am running Java 1.4.1_05 on my system. This runs fine. After some Alpha
    testers reported client problems, we brought up a test computer, installed a
    fresh Windows XP, installed Java 1.4.1_05 on the system, then installed the
    game. The updater ran fine, but the client failed to run. It threw null
    pointer exceptions when it tried to load the graphics from the graphics jar
    file (AndromedaGFX.jar)



    Strange as this may sound, this problem SEEMS to only to occur on newly
    installed JRE's.



    The problem appears to be that the client is not reading graphics from the
    associated graphics jar. The updater is small, so we were able to include
    its graphics with the updater, instead of in a separate jar, which is
    probably why the updater works fine.



    If we take the bad Andromeda game folder, copy it to another computer with
    Java on it, the game works fine. But copy the folder back to the freshly
    installed computer, and it won't work.



    We suspected a classpath issue, but there's a classpath info in the client
    jar which should prevent this. Further, we've updated all the classpath
    information on the new installation, aswel as path, and JAVA_HOME
    environmental variables. None of it worked (it is interesting to note that
    classpath isn't set on the working machine, it gets that from the client
    manifest).



    We've had this problem reported on three windows machines and have been
    unable to fix it. On at least 5 machines it appears to runs fine. We haven't
    a clue what is causing this problem. It does not appear to be the game or
    the code, as copying the game folder from a "bad" machine to a "good" one
    allows the client within the folder to work.



    It's very strange, and ALL of us here are stumped. We go to beta soon, and
    obviously this is a serious problem. Again, as strange as it sounds, the
    only common thread is new installs of java where none existed. Install java
    on your machine (any 1.4.1 or higher), and the client can't load it's own
    graphics files (copy of client manifest below).



    If you'd like to see the basic files, they can be found at
    http://www.aepox.net/andromeda/Downloads/AndromedaBasic.zip. This includes
    the updater and client, as well as the libraries. If you run the updater
    (AndromedaOnline.jar) it will attempt to download the graphics package
    (AndromedaGFX.jar). If you want to download the entire package (graphics and
    everything) it's at
    http://www.aepox.net/andromeda/Downloads/AndromedaOnline.zip



    Thank you for your time. Any thoughts as to the cause of this troublesome
    problem would be MUCH appreciated.



    Nick Soutter

    Aepox Games



    Manifest-Version: Version 1.0

    Specification-Title: Andromeda GameClient Classes

    Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;

    Main-Class: com.andromeda.gameclient.PreGameClient

    Implementation-Title: com.andromeda.gameclient

    Specification-Vendor: Aepox Games

    Specification-Version: 1.0

    Implementation-Version: 40119

    Name: com/andromeda/gameclient

    Implementation-Vendor: Aepox Games
     
    BlackHawke, Jan 21, 2004
    #1
    1. Advertising

  2. BlackHawke

    Phyrum Tea Guest

    BlackHawke wrote:

    > Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    >


    I don't know if it's a problem but your class-path does not meet the
    manifest specification for jar files.

    You may try to replace the semicolons with a space.

    http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

    Best regards

    Phyrum Tea
    --
    Firstname/Lastname: Phyrum Tea,
    http://www.tea.ch/ - Crossword Puzzle Software
     
    Phyrum Tea, Jan 21, 2004
    #2
    1. Advertising

  3. BlackHawke

    BlackHawke Guest

    Ohhhhhhhh....

    You're right!!

    I gave it a shot, and unfortunately that didn't work.... I'd think that
    would have been it... Thank you for the suggestion though, nice catch!!!

    So unfortunately, despite fixing that problem, this still doesn't work... :(

    any other thoughts?

    Nick




    "Phyrum Tea" <> wrote in message
    news:400e6fa1$...
    > BlackHawke wrote:
    >
    > > Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    > >

    >
    > I don't know if it's a problem but your class-path does not meet the
    > manifest specification for jar files.
    >
    > You may try to replace the semicolons with a space.
    >
    > http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    >
    > Best regards
    >
    > Phyrum Tea
    > --
    > Firstname/Lastname: Phyrum Tea,
    > http://www.tea.ch/ - Crossword Puzzle Software
     
    BlackHawke, Jan 21, 2004
    #3
  4. BlackHawke

    Jim Sculley Guest

    BlackHawke wrote:
    > Ohhhhhhhh....
    >
    > You're right!!
    >
    > I gave it a shot, and unfortunately that didn't work.... I'd think that
    > would have been it... Thank you for the suggestion though, nice catch!!!
    >
    > So unfortunately, despite fixing that problem, this still doesn't work... :(
    >
    > any other thoughts?


    Have you done any bare bones testing? Make the snallest working piece
    of code that uses the same mechanisms to load graphics and see if the
    problem persists. Keep things as close to real as possible. In other
    words, keep graphics file names the same, keep overall directory
    structures the same, and so on. If after this the problem goes away,
    you can be fairly certain there is something in your code that is
    causing the problem.
    >
    > Nick
    >
    >
    >
    >
    > "Phyrum Tea" <> wrote in message
    > news:400e6fa1$...
    >
    >>BlackHawke wrote:
    >>
    >>
    >>>Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    >>>

    >>
    >>I don't know if it's a problem but your class-path does not meet the
    >>manifest specification for jar files.
    >>
    >>You may try to replace the semicolons with a space.
    >>
    >>http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    >>
    >>Best regards
    >>
    >>Phyrum Tea
    >>--
    >>Firstname/Lastname: Phyrum Tea,
    >>http://www.tea.ch/ - Crossword Puzzle Software

    >
    >
    >
     
    Jim Sculley, Jan 22, 2004
    #4
  5. BlackHawke

    hiwa Guest

    "BlackHawke" <> wrote in message news:<r6qPb.19800$>...

    Show your code that accesses graphics files in question.
     
    hiwa, Jan 22, 2004
    #5
  6. Hi

    How does the updater start the game after the update is finished?
    Runtime.exec()? direct class-instantiation ?, ... ?

    greets,
    mike

    inexess technology
    Software-Development


    Jim Sculley wrote:

    > BlackHawke wrote:
    >
    >> Ohhhhhhhh....
    >>
    >> You're right!!
    >>
    >> I gave it a shot, and unfortunately that didn't work.... I'd think that
    >> would have been it... Thank you for the suggestion though, nice catch!!!
    >>
    >> So unfortunately, despite fixing that problem, this still doesn't
    >> work... :(
    >>
    >> any other thoughts?

    >
    >
    > Have you done any bare bones testing? Make the snallest working piece
    > of code that uses the same mechanisms to load graphics and see if the
    > problem persists. Keep things as close to real as possible. In other
    > words, keep graphics file names the same, keep overall directory
    > structures the same, and so on. If after this the problem goes away,
    > you can be fairly certain there is something in your code that is
    > causing the problem.
    >
    >>
    >> Nick
    >>
    >>
    >>
    >>
    >> "Phyrum Tea" <> wrote in message
    >> news:400e6fa1$...
    >>
    >>> BlackHawke wrote:
    >>>
    >>>
    >>>> Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    >>>>
    >>>
    >>> I don't know if it's a problem but your class-path does not meet the
    >>> manifest specification for jar files.
    >>>
    >>> You may try to replace the semicolons with a space.
    >>>
    >>> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    >>>
    >>> Best regards
    >>>
    >>> Phyrum Tea
    >>> --
    >>> Firstname/Lastname: Phyrum Tea,
    >>> http://www.tea.ch/ - Crossword Puzzle Software

    >>
    >>
    >>
    >>
     
    Michael Mangeng, Jan 22, 2004
    #6
  7. BlackHawke

    BlackHawke Guest

    This is it:

    public static void main(String args[]) {
    UpdateFrame uf = new UpdateFrame();

    try {Process p =
    Runtime.getRuntime().exec("java -Xmx64M -Xms64M -jar AndromedaClient.jar");}
    catch(Exception exc) {exc.printStackTrace(System.out);}

    uf.removeNotify();
    uf.dispose();

    Nick



    "Michael Mangeng" <> wrote in message
    news:buoqa9$k0fge$-berlin.de...
    > Hi
    >
    > How does the updater start the game after the update is finished?
    > Runtime.exec()? direct class-instantiation ?, ... ?
    >
    > greets,
    > mike
    >
    > inexess technology
    > Software-Development
    >
    >
    > Jim Sculley wrote:
    >
    > > BlackHawke wrote:
    > >
    > >> Ohhhhhhhh....
    > >>
    > >> You're right!!
    > >>
    > >> I gave it a shot, and unfortunately that didn't work.... I'd think that
    > >> would have been it... Thank you for the suggestion though, nice

    catch!!!
    > >>
    > >> So unfortunately, despite fixing that problem, this still doesn't
    > >> work... :(
    > >>
    > >> any other thoughts?

    > >
    > >
    > > Have you done any bare bones testing? Make the snallest working piece
    > > of code that uses the same mechanisms to load graphics and see if the
    > > problem persists. Keep things as close to real as possible. In other
    > > words, keep graphics file names the same, keep overall directory
    > > structures the same, and so on. If after this the problem goes away,
    > > you can be fairly certain there is something in your code that is
    > > causing the problem.
    > >
    > >>
    > >> Nick
    > >>
    > >>
    > >>
    > >>
    > >> "Phyrum Tea" <> wrote in message
    > >> news:400e6fa1$...
    > >>
    > >>> BlackHawke wrote:
    > >>>
    > >>>
    > >>>> Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    > >>>>
    > >>>
    > >>> I don't know if it's a problem but your class-path does not meet the
    > >>> manifest specification for jar files.
    > >>>
    > >>> You may try to replace the semicolons with a space.
    > >>>
    > >>> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    > >>>
    > >>> Best regards
    > >>>
    > >>> Phyrum Tea
    > >>> --
    > >>> Firstname/Lastname: Phyrum Tea,
    > >>> http://www.tea.ch/ - Crossword Puzzle Software
    > >>
    > >>
    > >>
    > >>

    >
     
    BlackHawke, Jan 23, 2004
    #7
  8. BlackHawke

    BlackHawke Guest

    You are the best!!!!!

    I went over the code, and I FOUND THE PROBLEM.... Thank you!!!!! We had a
    different directory for 600x800 resolution which we no longer use. That's
    the problem. On 600x800 resolution, the graphics couldn't be found

    NIck
    "hiwa" <> wrote in message
    news:...
    > "BlackHawke" <> wrote in message

    news:<r6qPb.19800$>...
    >
    > Show your code that accesses graphics files in question.
     
    BlackHawke, Jan 23, 2004
    #8
  9. BlackHawke

    BlackHawke Guest

    Problem Solved!

    Thank you all!

    Based on a suggestion made her, I looked over the code and found the
    problem. In 600x800 settings, a different folder was used to store the
    graphics. We disabled 600x800 support, but that line was never commented
    out.

    Thank's all for helping. It's so incredible that there is the resource of
    people like you taking this kind of time. Thank you, thank you, thank you.

    Sincerely

    Nick Soutter
    Aepox Games

    "BlackHawke" <> wrote in message
    news:r6qPb.19800$...
    > My name is Nick Soutter, I own a small game development company
    > (www.aepoxgames.net) making our first game (www.andromedaonline.net) in
    > java.
    >
    >
    >
    > I am writing because we are having a very serious problem, and I was

    hoping
    > someone might have thoughts.
    >
    >
    >
    > Our game has 2 main programs- one is an updater, the other is the game
    > client. The updater (AndromedaOnline.jar) checks for updates to the
    > graphics, sound, client, and of course itself. After applying any updates,
    > the updater runs the client (AndromedaClient.jar) for people to play with.
    >
    >
    >
    > When players install this program on their systems with pre-existing
    > versions of JAVA, it runs fine. When they try to install it after

    installing
    > a fresh, new Java JRE, however, it fails.
    >
    >
    >
    > I am running Java 1.4.1_05 on my system. This runs fine. After some Alpha
    > testers reported client problems, we brought up a test computer, installed

    a
    > fresh Windows XP, installed Java 1.4.1_05 on the system, then installed

    the
    > game. The updater ran fine, but the client failed to run. It threw null
    > pointer exceptions when it tried to load the graphics from the graphics

    jar
    > file (AndromedaGFX.jar)
    >
    >
    >
    > Strange as this may sound, this problem SEEMS to only to occur on newly
    > installed JRE's.
    >
    >
    >
    > The problem appears to be that the client is not reading graphics from the
    > associated graphics jar. The updater is small, so we were able to include
    > its graphics with the updater, instead of in a separate jar, which is
    > probably why the updater works fine.
    >
    >
    >
    > If we take the bad Andromeda game folder, copy it to another computer

    with
    > Java on it, the game works fine. But copy the folder back to the freshly
    > installed computer, and it won't work.
    >
    >
    >
    > We suspected a classpath issue, but there's a classpath info in the client
    > jar which should prevent this. Further, we've updated all the classpath
    > information on the new installation, aswel as path, and JAVA_HOME
    > environmental variables. None of it worked (it is interesting to note that
    > classpath isn't set on the working machine, it gets that from the client
    > manifest).
    >
    >
    >
    > We've had this problem reported on three windows machines and have been
    > unable to fix it. On at least 5 machines it appears to runs fine. We

    haven't
    > a clue what is causing this problem. It does not appear to be the game or
    > the code, as copying the game folder from a "bad" machine to a "good" one
    > allows the client within the folder to work.
    >
    >
    >
    > It's very strange, and ALL of us here are stumped. We go to beta soon, and
    > obviously this is a serious problem. Again, as strange as it sounds, the
    > only common thread is new installs of java where none existed. Install

    java
    > on your machine (any 1.4.1 or higher), and the client can't load it's own
    > graphics files (copy of client manifest below).
    >
    >
    >
    > If you'd like to see the basic files, they can be found at
    > http://www.aepox.net/andromeda/Downloads/AndromedaBasic.zip. This includes
    > the updater and client, as well as the libraries. If you run the updater
    > (AndromedaOnline.jar) it will attempt to download the graphics package
    > (AndromedaGFX.jar). If you want to download the entire package (graphics

    and
    > everything) it's at
    > http://www.aepox.net/andromeda/Downloads/AndromedaOnline.zip
    >
    >
    >
    > Thank you for your time. Any thoughts as to the cause of this troublesome
    > problem would be MUCH appreciated.
    >
    >
    >
    > Nick Soutter
    >
    > Aepox Games
    >
    >
    >
    > Manifest-Version: Version 1.0
    >
    > Specification-Title: Andromeda GameClient Classes
    >
    > Class-Path: lib/jmf.jar;AndromedaGFX.jar;AndromedaSFX.jar;
    >
    > Main-Class: com.andromeda.gameclient.PreGameClient
    >
    > Implementation-Title: com.andromeda.gameclient
    >
    > Specification-Vendor: Aepox Games
    >
    > Specification-Version: 1.0
    >
    > Implementation-Version: 40119
    >
    > Name: com/andromeda/gameclient
    >
    > Implementation-Vendor: Aepox Games
    >
    >
     
    BlackHawke, Jan 23, 2004
    #9
  10. BlackHawke

    hiwa Guest

    Re: Problem Solved!

    "BlackHawke" <> wrote in message news:<h%3Qb.23219$>...

    That's not worth posting on a public forum because you have
    not shown the relevant code.
     
    hiwa, Jan 23, 2004
    #10
  11. Re: Problem Solved!

    "hiwa" <> wrote in message
    news:...
    | "BlackHawke" <> wrote in message
    news:<h%3Qb.23219$>...
    |
    | That's not worth posting on a public forum because you have
    | not shown the relevant code.

    I disagree, I think it is good manners to say thanks for the help which you
    have received :)
    --
    -P
     
    PerfectDayToChaseTornados, Jan 23, 2004
    #11
  12. BlackHawke

    BlackHawke Guest

    Re: Problem Solved!

    Well PerfectDay, I think perhaps hiwa meant the problem was not worth
    posting, not the "Thanks" (though I appreciate your defense).

    I do disagree with hiwa, however.

    I thought the issue would be a classpath issue or something else someone
    might have seen before. I didn't post the relative code because, well, I
    didn't know what the relevant code might be. The errors were in multiple
    class files. I had no way of knowing it was the loader. If I did, I'd have
    posted the loader code, but I'd also have known what the problem was, so I
    wouldn't have had to post.

    When someone requested a segment (the runtime.exe code), I happily posted
    it.

    And I would not have found the problem had I not seen the post (which I
    can't seem to find now) which recommended checking the loader code. That
    post lead directly to us finding the problem, and was a huge help (all the
    suggestions were great, and one was right!)

    So I will respectfully have to disagree with hiwa.

    Nick Soutter
     
    BlackHawke, Jan 26, 2004
    #12
  13. Andrew Thompson, Jan 26, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Alan Farrell
    Replies:
    6
    Views:
    9,721
    Andrew Thompson
    Jan 9, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    599
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,754
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,808
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    681
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page