Closed UltraBurstXD closed 4 years ago
According to the error - your extension is missing the XML resource. It either did not make it into your JAR file, placed in the wrong package or cannot be read for some other reason.
I've made sure to place the XML in my project folder and used the following code to read it:
StyleManager.addExtensions ( new XmlSkinExtension ( new ClassResource ( SimpleDecoration.class, "SimpleExtension.xml") ) );
My project has only one package, and I'm using Ant build.
With that definition:
new ClassResource ( SimpleDecoration.class, "SimpleExtension.xml" )
Your SimpleExtension.xml
needs to be in the same package as SimpleDecoration
class, not just anywhere in the project - resource finding is always strict. You also need to make sure that it actually made it into JAR as well and also located near that class there, if you're getting the error when running your app from the JAR.
Got it right! It's working! Thanks.
Hello Mgarin,
I'm having some problems (crashes) when my program tries those deserialization methods mentioned in the wiki-website for windows decoration.: https://github.com/mgarin/weblaf/wiki/Window-decoration.
But I'm not having success so far. And below behold the report:
The first 5 lines warning, always appear when I initialize the l&f, but it doesn't matter. The bold line shows that XStream wasn't initialized, but i've already given it all permissions and initialized it.
P.S.: By the way, I've already added required jars to my project classpath
The code is the same as in the website and I've added the XML file inside my project location (folder).