[jdom-interest] JDOM and Android

Rolf Lear jdom at tuis.net
Mon Apr 16 20:08:50 PDT 2012

Hi all.

I am having some limited success with the Android testing. I have run in 
to an issue through which could really use some input from experienced 
Android developers.

Are there any on JDOM-interest with some time to spare?

My issue right now is that the JUnit tests are mostly passing, but a 
number of them rely on using 
ClassLoader.getSystemResource("path/to/file.xml") to load resources as a 

It is improtant to keep it as a URL because many of these tests rely on 
internal DTD's and XSD's, which, in turn mean that when they are 
processed the input file's URL will be used as a base for a relative 
location of the DTD/XSD.

In other words, I need to keep access to these files as a URL....

But, ClassLoader.getSystemResource(...)  is returning null on Android.

I think it is related to 

But, I can't find a good way to work around the issue....

So, If there's some experienced Android developer who can shed some 
light in to this particular dark place, I would appreciate it.

For the record, I have a full test-suite available for any Android 
developers who happen to use eclipse. It fully compiled, loads, and I am 
running a 'Test' Project on a 4.0.3 emulator.

I can, in theory, help you bootstrap the environment in your eclipse 
pretty easily... if needed.


More information about the jdom-interest mailing list