| Author |
Java 5->6 or Windows->Mac class loading differences?
|
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
Hi, Does anyone know of any differences in how class loading works, between Java 5 and Java 6? Or perhaps between Sun Windows Java 6 JVM and Mac Java 5 JVM? I have an application with a custom class loader. It seems to be working fine on Windows and to be having problems on Mac OS X. I would expect them both to be the same. It's possible that the difference is in fact one of timing, between my Mac and my PC, rather than platform, but I thought I'd ask the question.
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
|
It's not anything as trivial as path separator or directory name separator differences, is it? ':' and '/' on Mac OS X, and ';' and '\' on Windows?
|
[Jess in Action][AskingGoodQuestions]
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
|
Er, no. This application has been working fine on Mac, Linux and Windows, for years, so those types of issues were sorted out ages ago.
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
Looks like the problem may be due to the Mac "losing" the context class loader. My app sets the main thread's context class loader, as the second statement in the whole app (constructing the loader is the first). All other threads ought to inherit that, as they're all descendents of main. But I find that there's sometimes a null context class loader, on the Mac. That never happens on Windows. Trying now to tie this down fully, so we double-check the bug's really Apple's. The alternative would be that it's in a third-party library (but then why only on Mac?).
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12921
|
|
|
I don't have a Mac, so I don't know of any differences in classloading. It is possible that it's a bug in either Sun's Java or Apple's Java for the Mac. You could try searching Sun's bug database, or Apple's (I don't know if they have a public bug database).
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Java 5->6 or Windows->Mac class loading differences?
|
|
|