Re: Synth XML file placement
- From: "Wizumwalt@xxxxxxxxx" <Wizumwalt@xxxxxxxxx>
- Date: 27 Jun 2005 12:36:43 -0700
I added that code to the section of my app where I do all this and w/
the exception of the currentDir working, all the other lines printed
'null' I *think* because IO.class (which I substitued w/ the class name
I wrote this code in) is in a jar file and I'm not sure how to get this
class out of a jar file.
Synth can be found in the J2SE in this package ...
javax.swing.plaf.synth
The following code throws an IOException when executing the
'InputStream is = ...' line and I can't quite figure out why.
---
....
// I'm not sure if this line is executing correctly because
// MyClass.class is in a jar file. But aClass.toString()
// prints the correct class name (though I don't understand how).
Class aClass = MyClass.class;
// IOException thrown here, probably because I don't see how
// the previous line can get 'MyClass'
InputStream is = aClass.getResourceAsStream("myTheme.xml");
if (is == null) {
System.err.println("Unable to find theme configuration");
}
synth.load(is, aClass);
---
Does that sound right? I'm thinking I'm not getting 'MyClass.class' out
of the jar correctly, nor do I know how.
Any help much appreciated.
.
- Follow-Ups:
- Re: Synth XML file placement
- From: Wizumwalt@xxxxxxxxx
- Re: Synth XML file placement
- References:
- Synth XML file placement
- From: Wizumwalt
- Re: Synth XML file placement
- From: Andrew Thompson
- Synth XML file placement
- Prev by Date: JSpinner ChangeEvent and JOptionPane
- Next by Date: Re: Synth XML file placement
- Previous by thread: Re: Synth XML file placement
- Next by thread: Re: Synth XML file placement
- Index(es):