I am getting an exception when trying to find the reousrce file:
Couldn't open from file, trying classpath (java.io.FileNotFoundException: \data\resources.xml (The system cannot find the path specified))
Couldn't open stream for 'resources.xml' from either file system or classpath (base dir is '/data')
Couldn't open 'resources.xml' from either file system or classpath (base dir is '/data')
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
at com.triangularpixels.rebirth.resources.ResourceParser.parse(ResourceParser.java:58)
at com.triangularpixels.rebirth.resources.ResourcePool.parse(ResourcePool.java:60)
at com.seige.SeigeResources.getResourcePool(SeigeResources.java:19)
at com.seige.Seige.initStatesList(Seige.java:29)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:157)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at com.seige.Seige.main(Seige.java:40)
Here is the line of code:
resources = Resources.createPool("/data", Resources.DecoderGroup.CORE, true);
resources.parse("resources.xml");
I have tried “/data” and “data” an neither works. I have the data directory at the root of my src directory like this:
src
|–com
| |—seige
|
|–data
|–images
|–resources.xml
I would look at it myself, but the source isn’t available yet.
Any thoughts?
Thanks.
It was a networked multiplayer rampart clone.