From: Stefan F. <ste...@we...> - 2011-11-25 12:12:39
|
As suspected the background map could only be located from the file system, this does not work with the released .jar. Again I struggled a little bit with the Rails classLoader which is clearly legacy code from Colossus (in the comments it is still referred to as ColossusClassLoader): However simply using the standard approach using getClass().getResource(URI) worked, even if I do not exactly how it gets resolved. Only issue was that I needed to add an additional separator at the beginning of the path. Final comment: Is there any usage for the configuration option map.root_directory? Otherwise I would drop that so far, unless we know how we want to use that. Stefan > I wonder if no other user ever tried using a background map before??? > > Seems that the map file is not correctly located in the jar, thus uses not > the default Class/Resource-Loader. As we developers run from Eclipse > we have not seen the bug before. I will look into that. > I have changing the Classloader high on my priority-list for Rails 2.x for > several reasons anyway. > > Stefan > > On Tuesday, November 22, 2011 05:11:28 am Jerry Anderson wrote: > > Ok - i figured out what i was doing wrong. the game starts but I am not > > seeing the background map for 18GA. I am getting an error about the path. > > There is no "data" directory. This is the error > > java.io.FileNotFoundException: > > C:\Personal\18XX\rails-1.5.3\rails-1.5.3\data\18GA\MapImage.svg (The > > system cannot find the path specified) at > > java.io.FileInputStream.open(Native Method) > > > > at java.io.FileInputStream.<init>(Unknown Source) > > at java.io.FileInputStream.<init>(Unknown Source) > > at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source) > > at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown > > > > Source) at > > org.apache.batik.util.ParsedURLData.openStreamInternal(ParsedURLData.java > > : 547) at > > org.apache.batik.util.ParsedURLData.openStream(ParsedURLData.java:471) at > > org.apache.batik.util.ParsedURL.openStream(ParsedURL.java:417) at > > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocum > > e ntFactory.java:158) at > > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(SAXSVGDo > > c umentFactory.java:124) at > > org.apache.batik.bridge.DocumentLoader.loadDocument(DocumentLoader.java:1 > > 0 6) at > > org.apache.batik.swing.svg.SVGDocumentLoader.run(SVGDocumentLoader.java:8 > > 4 ) > > > > > > > > ________________________________ > > > > From: Jerry Anderson <jer...@ya...> > > > > To: "rai...@li..." > > <rai...@li...> Sent: Monday, November 21, 2011 7:34 > > PM > > Subject: [Rails-users] How do i run Rails on Windows > > > > > > Are there instructions somewhere that explain how to run the game. I see > > the batch file but I have no idea what to supply as a command line > > parameter. %1. > > > > ------------------------------------------------------------------------- > > -- --- All the data continuously generated in your IT infrastructure > > contains a definitive record of customers, application performance, > > security threats, fraudulent activity, and more. Splunk takes this data > > and makes sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-novd2d > > _______________________________________________ > > Rails-users mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-users > > --------------------------------------------------------------------------- > --- All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |