• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Greenhorn
Posts: 21
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic