>> >> java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
>> >> at java.lang.Class.forName0(Native Method)
>> > You're right, that's not the message you'd see with an unset DISPLAY
>> > variable. That class should be in rt.jar... I wonder why you're not
>> > finding it.
>> 
>> Mmm indeed!  Oh dear, this process seems to be a never-ending
>> journey of fixing one problem and then crashing into another brick
>> wall!
>
>I'll be tackling some servlet projects in a few weeks... I may have more
>insight then into why the AWT interface to X seems to be AWOL. Of
>course, there's probably someone reading this who already knows the
>answer :-).

Note that this is NoClassDefFoundError and not ClassNotFoundException.
This is a subtle and note very well documented (imnsho). Technically:
the former means that the class was found once, and now is not while
the latter means that the class just doesn't exist in the classpath.
In practice: I've seen NoClassDefFoundError for other linkage errors...
for example: I ask for class X (load class), which needs class Y (load
class from class), class Y needs something inorder to be loaded (static
initializer relies on making rmi call to a server that isn't up - don't
laugh! I've seen it coded and they don't understand why it is bad...).
Whatever class Y needs fails (with an exceptionInInitiailizerError) and
causes class load from class to fail, which in turn causes class load
to fail with the (wrong damn excpetion) NoClassDefFoundError. I have
seen this on 117. I wouldn't doubt it on 12. would someone with access
to the source for this class take a look at <clinit> and see what kind
of exceptions it could generate? Especially in the case that there is
no Xserver? Actually if anyone here is the class file hacker sort you
can put the entire method into a protection block, almost if you had
coded it like this... 

try{
//entire contents of clinit
}catch (Throwable t) {
 t.printStackTrace();
 throw t;
}

(yes, I know it ain't easy... but it is doable! better tooling for
class file manipulation would help immensly.) -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-----BEGIN GEEK CODE BLOCK-----   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL++++ UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
------END GEEK CODE BLOCK------


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to