[jdom-interest] Using JDOM with Microcoft Java VM + Internet Explorer (Fixing NoClassDefFoundError) (Archive purposes)

Matthew MacKenzie matt at xmlglobal.com
Fri Jun 29 15:08:10 PDT 2001

Wouldn't you just place the JDOM and parser files in the codebase
location of the applet?  It seems kind of baked to have to edit the
registry to run an applet.


-----Original Message-----
From: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]
On Behalf Of Jake Latham
Sent: Friday, June 29, 2001 2:01 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] Using JDOM with Microcoft Java VM + Internet
Explorer (Fixing NoClassDefFoundError) (Archive purposes)

OK - Thanks Ian for the comment that sparked the idea - I was able to
get things working.

Here's what I did to get it working, in case this saves anybody time in
the future.  From what I was able to gather from reading the archives,
if you're getting NoClassDefFound errors, then your compiler or runtime
environment doesn't know where the proper .jar files are.

solution: set the path so that the compiler or runtime environment can
find it.  For normal Java Apps, apparently this means setting the
CLASSPATH environment variable.

I was getting this error when trying to run the program as an applet
under Internet Explorer, but it compiled fine, since the classpath
included jdom.jar and xerces.jar.

So, set the Classpath for Microsoft's VM open up the registry editor
(start->run->regedit) and go to the key:

MY Computer\HKLocalMachine\Software\Microsoft\Java VM\ClassPath

edit that to include a path that points to your jdom.jar and any
other.jar files you need.  Mine only worked when I hard-coded the path,
using %JAVA_HOME% didn't work for me for some reason.

Save it, and retry your app - it should be OK if you've gotten the
correct paths.  For example's sake, here's what mine looks like now:


I hope this helps somebody in the future...

RockySoft Corporation
2301 Research Boulevard - Suite 202
Jake Latham
Code Monkey
Phone:  (970) 493-0868 x112
Fax:    (970) 493-0887

-----Original Message-----
From: tril at www2.blackwell.co.uk [mailto:tril at www2.blackwell.co.uk]On
Behalf Of Ian Lea
Sent: Friday, June 29, 2001 2:08 PM
To: jlatham at rockysoft.com
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Getting Started...and stalled by SAXBuilder
error. Help?

I'd say it HAS to be because jdom.jar isn't being found at runtime. Are
you absolutely, completely, positive it is in the classpath used at

ian.lea at blackwell.co.uk

Jake Latham wrote:
> Hi all!
> As if you couldn't tell, I'm new to the list.  I've done a lot with 
> XML,
> not so much with Java, so I'm still trying to get acclimatized.  I 
> built
> jdom package and have been able to compile my code OK, but at runtime,

> I'm getting a SAXBuilder error.  I searched the archives and couldn't 
> find anything that worked for me, so I thought I'd see if you folks 
> could help.
> Here are the particulars.
> 1.) The error:
> Exception occurred during event dispatching:
> java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
>  at applets/VITPanel.checkForNodeClicked (vitpanel.java:373) ...
> 2.) Import Statements:
> package applets;
> import shout3d.core.*;
> import shout3d.math.*;
> import shout3d.*;
> import java.net.*;
> import java.io.*;
> import org.jdom.*;
> import org.jdom.input.SAXBuilder;
> import org.jdom.output.*;
> import java.util.*;
> 3.) The actual code:
> SAXBuilder saxBuilder = new SAXBuilder();   ;-) Complex I know :-)
> JAVA_HOME = C:\Java
> amming\Shout3D\Shout3d_runtime\codebase;
> I know it must be something related to the path information, but I 
> don't really know what it is - can you help me out?
> Thanks a bunch,
> -J

To control your jdom-interest membership:

More information about the jdom-interest mailing list