• Post Reply Bookmark Topic Watch Topic
  • New Topic

1.7_02 -> 1.5, Now throws java.io.UTFDataFormatException

 
Daniel Croft
Greenhorn
Posts: 21
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I'm writing this game. It was working fine using the 1.7_02 jdk, but then I downgraded it to 1.5 so that it would run on my brother's Mac. Now when I run it, it can't load png files. Here's the code that generates the exception:



This code generates the following stacktrace + exception



I also tried this instead, but it gave me the same thing



If anyone has any ideas why 1.5 would throw this exception but 1.7 wouldn't that would be great.
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know this for certain, but one likely answer is that Sun/Oracle fixed the bug sometime after they released your Java 1.5 version.
 
Daniel Croft
Greenhorn
Posts: 21
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I really hope that's not it. My brother is helping me with the game and Apple has him over a barrel because they never bother to update their Java.
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apple and Java? Yeah, no kidding. Anyway Sun and Oracle have always published a big list of bug fixes along with their "What changed in this version" document. It would be tedious, but if you were really interested you could track down those documents and read all of the bug fixes to see if that's one of them.
 
Daniel Croft
Greenhorn
Posts: 21
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haha, yeah. I don't think I'm that committed. I originally installed 1.5.0, and there were 22 updates until 1.6. I guess I could just try to narrow down where it breaks by downloading a few more JREs, maybe then I'd stand a chance.
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 6 for Apple was released nearly 3 years ago... but maybe your brother has an old Mac OS version which doesn't support it?
 
Daniel Croft
Greenhorn
Posts: 21
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, he has umm... 10.5.8 I think. I looked it up and I found 1.6 for it, but it was only for the 64bit version :/
 
Daniel Croft
Greenhorn
Posts: 21
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After some trial and error, I finally found that the problem was fixed by the update from 1.5.0_22 -> 1.6.0. I don't know if this might help anyone figure out how I might run my code on 1.5 but I'm still looking for a solution and any help would be appreciated.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!