Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Game- Game can't find it's graphics jar file

Reply
Thread Tools

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

 
 
BlackHawke
Guest
Posts: n/a
 
      01-21-2004
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/Downl...omedaBasic.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/Downl...medaOnline.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


 
Reply With Quote
 
 
 
 
Phyrum Tea
Guest
Posts: n/a
 
      01-21-2004
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.velocityreviews.com/forums/(E-Mail Removed)
http://www.tea.ch/ - Crossword Puzzle Software
 
Reply With Quote
 
 
 
 
BlackHawke
Guest
Posts: n/a
 
      01-21-2004
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" <(E-Mail Removed)> wrote in message
news:400e6fa1$(E-Mail Removed)...
> 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, (E-Mail Removed)
> http://www.tea.ch/ - Crossword Puzzle Software



 
Reply With Quote
 
Jim Sculley
Guest
Posts: n/a
 
      01-22-2004
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" <(E-Mail Removed)> wrote in message
> news:400e6fa1$(E-Mail Removed)...
>
>>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, (E-Mail Removed)
>>http://www.tea.ch/ - Crossword Puzzle Software

>
>
>

 
Reply With Quote
 
hiwa
Guest
Posts: n/a
 
      01-22-2004
"BlackHawke" <(E-Mail Removed)> wrote in message news:<r6qPb.19800$(E-Mail Removed) hlink.net>...

Show your code that accesses graphics files in question.
 
Reply With Quote
 
Michael Mangeng
Guest
Posts: n/a
 
      01-22-2004
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" <(E-Mail Removed)> wrote in message
>> news:400e6fa1$(E-Mail Removed)...
>>
>>> 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, (E-Mail Removed)
>>> http://www.tea.ch/ - Crossword Puzzle Software

>>
>>
>>
>>


 
Reply With Quote
 
BlackHawke
Guest
Posts: n/a
 
      01-23-2004
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" <(E-Mail Removed)> wrote in message
news:buoqa9$k0fge$(E-Mail Removed)-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" <(E-Mail Removed)> wrote in message
> >> news:400e6fa1$(E-Mail Removed)...
> >>
> >>> 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, (E-Mail Removed)
> >>> http://www.tea.ch/ - Crossword Puzzle Software
> >>
> >>
> >>
> >>

>



 
Reply With Quote
 
BlackHawke
Guest
Posts: n/a
 
      01-23-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ...
> "BlackHawke" <(E-Mail Removed)> wrote in message

news:<r6qPb.19800$(E-Mail Removed) hlink.net>...
>
> Show your code that accesses graphics files in question.



 
Reply With Quote
 
BlackHawke
Guest
Posts: n/a
 
      01-23-2004
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" <(E-Mail Removed)> wrote in message
news:r6qPb.19800$(E-Mail Removed) link.net...
> 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/Downl...omedaBasic.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/Downl...medaOnline.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
>
>



 
Reply With Quote
 
hiwa
Guest
Posts: n/a
 
      01-23-2004
"BlackHawke" <(E-Mail Removed)> wrote in message news:<h%3Qb.23219$(E-Mail Removed) link.net>...

That's not worth posting on a public forum because you have
not shown the relevant code.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM
Jar file cannot find main class - gfSetup.jar (0/1) James Alan Farrell Java 6 01-09-2004 12:40 PM



Advertisments