Can't load style-jar

Hey,



I have a little problem with the Nifty GUI.

Because I wanted to use the default-controls and the Black style I included these two lines in my XML:

[xml]

<useStyles filename=“Interfaceniftynifty-style-black-1.3-SNAPSHOT.jar” />

<useControls filename=“Interfaceniftynifty-default-controls-1.3-SNAPSHOT.jar” />

[/xml]

and I copied these two jar-Files to “Interfacenifty”

But when I try to run it it says:



[…]

INFO: loadFromFile [Interface/Nifty/helloJme.xml]

19.06.2011 18:13:46 de.lessvoid.nifty.loaderv2.NiftyLoader loadNiftyXml

INFO: loading new nifty xml file with schemaId [nifty.nxs]

19.06.2011 18:13:46 de.lessvoid.nifty.loaderv2.NiftyLoader loadStyleFile

INFO: loading new nifty style xml file [Interfaceniftynifty-style-black-1.3-SNAPSHOT.jar] with schemaId [nifty-styles.nxs]

org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not P (position: START_DOCUMENT seen P… @1:1)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)

at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at de.lessvoid.xml.xpp3.XmlParser.nextTag(XmlParser.java:178)

at de.lessvoid.xml.lwxs.Schema.loadXml(Schema.java:66)

at de.lessvoid.nifty.loaderv2.NiftyLoader.loadStyleFile(NiftyLoader.java:105)

at de.lessvoid.nifty.loaderv2.types.UseStylesType.loadStyle(UseStylesType.java:13)

at de.lessvoid.nifty.loaderv2.types.NiftyType.loadStyles(NiftyType.java:144)

at de.lessvoid.nifty.loaderv2.NiftyLoader.loadNiftyXml(NiftyLoader.java:49)

at de.lessvoid.nifty.Nifty.loadFromFile(Nifty.java:467)

[…]



I’m not sure what I did wrong and hope someone can help me.



Greetings Mike

Hey I think I got the problem fixed.

I have just extracted these two jars into their folder and changed the xml file this way:

[xml]

<?xml version="1.0" encoding="UTF-8"?>

<nifty xmlns="http://nifty-gui.sourceforge.net/nifty.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty.xsd http://nifty-gui.sourceforge.net/nifty.xsd">



<useStyles filename="Interfaceniftynifty-style-black-1.3-SNAPSHOTnifty-default-styles.xml" />

<useControls filename="Interfaceniftynifty-default-controls-1.3-SNAPSHOTnifty-default-controls.xml" />



<screen id="start" controller="pongGame.MenuController_Main">

<layer id="layer1" backgroundColor="#000" childLayout="center">

<panel height="600" width="800" align="center" valign="center" backgroundColor="#000" childLayout="center" visibleToMouse="true">

<!-- <image filename="TexturesInfinity_Pong_Logo.png" width="800" height="400" align="center" valign="center"></image>–>

<control name="textfield" maxLength="20" passwordChar="*" />

</panel>

</layer>

</screen>

</nifty>

[/xml]



And it works :smiley:



Greets Mike