From: brett l. <wak...@gm...> - 2007-06-17 22:07:06
|
I don't think it necessarily needs to use Windows-style paths as just needs to be able to specify a path name rather than just assuming it's in the default path. ---Brett. On 6/17/07, Erik Vos <eri...@hc...> wrote: > I doubt if it is possible to have getResourceAsStream use > (Windows-style) paths, but of course you can try. > Erik. > > > -----Original Message----- > > From: rai...@li... > > [mailto:rai...@li...] On Behalf > > Of brett lentz > > Sent: Sunday 17 June 2007 21:02 > > To: Development list for Rails: an 18xx game > > Subject: Re: [Rails-devel] Generics etc. > > > > Yep, they're in the same directory. > > > > Perhaps we allow should specifying an alternate path for those config > > files along with specifying alternate names for those files. > > > > ---Brett > > > > On 6/17/07, Erik Vos <eri...@hc...> wrote: > > > No, but again: if it's in the classpath, it should be found. > > > Do you have LocalisedText.properties in the same directory > > as my.properties. > > > > > > In fact, I have been lying: I use the -D option because my > > > version of my.properties is non-standard, and called > > my_my.properties. > > > > > > I only pass the name, not the path, and it is found because > > it is in the > > > classpath. > > > > > > Erik. > > > > > > > -----Original Message----- > > > > From: rai...@li... > > > > [mailto:rai...@li...] On Behalf > > > > Of brett lentz > > > > Sent: Sunday 17 June 2007 18:33 > > > > To: Development list for Rails: an 18xx game > > > > Subject: Re: [Rails-devel] Generics etc. > > > > > > > > Yep, that did it. However, now it looks like there's a problem > > > > locating the LocalisedText resource. It looks like we > > don't have a > > > > flag to specify its location on the command-line. > > > > > > > > > > > > Cmdline configfile setting = /Documents and > > > > Settings/Brett/workspace/18xx/my.properties > > > > Configuration file = /Documents and > > > > Settings/Brett/workspace/18xx/my.properties > > > > Exception in thread "AWT-EventQueue-0" > > > > java.util.MissingResourceException: Can't find bundle for > > base name > > > > LocalisedText, locale en_US > > > > at > > > > > > java.util.ResourceBundle.throwMissingResourceException(Unknown Source) > > > > at java.util.ResourceBundle.getBundleImpl(Unknown Source) > > > > at java.util.ResourceBundle.getBundle(Unknown Source) > > > > at rails.util.LocalText.getText(LocalText.java:61) > > > > at rails.util.LocalText.getText(LocalText.java:27) > > > > at rails.game.Game.initialise(Game.java:55) > > > > at rails.ui.swing.Options.actionPerformed(Options.java:256) > > > > at > > > > javax.swing.AbstractButton.fireActionPerformed(Unknown Source) > > > > at > > > > javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) > > > > at > > > > javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) > > > > at javax.swing.DefaultButtonModel.setPressed(Unknown Source) > > > > at > > > > javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unkno > > > > wn Source) > > > > at java.awt.Component.processMouseEvent(Unknown Source) > > > > at javax.swing.JComponent.processMouseEvent(Unknown Source) > > > > at java.awt.Component.processEvent(Unknown Source) > > > > at java.awt.Container.processEvent(Unknown Source) > > > > at java.awt.Component.dispatchEventImpl(Unknown Source) > > > > at java.awt.Container.dispatchEventImpl(Unknown Source) > > > > at java.awt.Component.dispatchEvent(Unknown Source) > > > > at > > > > java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) > > > > at > > > > java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) > > > > at > > java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) > > > > at java.awt.Container.dispatchEventImpl(Unknown Source) > > > > at java.awt.Window.dispatchEventImpl(Unknown Source) > > > > at java.awt.Component.dispatchEvent(Unknown Source) > > > > at java.awt.EventQueue.dispatchEvent(Unknown Source) > > > > at > > > > > > java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) > > > > at > > > > > > java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > > > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > > > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > > > > at java.awt.EventDispatchThread.run(Unknown Source) > > > > > > > > > > > > ---Brett > > > > > > > > On 6/17/07, Erik Vos <eri...@hc...> wrote: > > > > > BTW I remember having seen a similar thing fairly recently. > > > > > Not sure if it was following the switch to Java 1.5, but if so, > > > > > one theory could be that the 1.5 version of > > getResourceAsStream() > > > > > has problems with Windows-style file paths. > > > > > > > > > > > -----Original Message----- > > > > > > From: rai...@li... > > > > > > [mailto:rai...@li...] On Behalf > > > > > > Of Erik Vos > > > > > > Sent: Saturday 16 June 2007 22:31 > > > > > > To: 'Development list for Rails: an 18xx game' > > > > > > Subject: Re: [Rails-devel] Generics etc. > > > > > > > > > > > > Don't know. Perhaps a classpath problem? > > > > > > > > > > > > I'm running it from Eclipse with VM-option > > > > -Dconfigfile=my.properties, > > > > > > with a classpath that includes the directory where the > > > > configfile is > > > > > > located. > > > > > > > > > > > > Erik. > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: rai...@li... > > > > > > > [mailto:rai...@li...] On Behalf > > > > > > > Of brett lentz > > > > > > > Sent: Saturday 16 June 2007 21:04 > > > > > > > To: Development list for Rails: an 18xx game > > > > > > > Subject: Re: [Rails-devel] Generics etc. > > > > > > > > > > > > > > I've finally gotten some free time to check out the changes. > > > > > > > Unfortunately, it looks like I can't even start up > > a game now... > > > > > > > > > > > > > > > > > > > > > Cmdline configfile setting = C:\Documents and > > > > > > > Settings\Brett\workspace\18xx\my.properties > > > > > > > Configuration file = C:\Documents and > > > > > > > Settings\Brett\workspace\18xx\my.properties > > > > > > > log4j:WARN No appenders could be found for logger > > (rails.util). > > > > > > > log4j:WARN Please initialize the log4j system properly. > > > > > > > Exception whilst loading properties file C:\Documents and > > > > > > > Settings\Brett\workspace\18xx\my.properties > > > > > > > java.lang.NullPointerException > > > > > > > at > > java.util.Properties$LineReader.readLine(Unknown Source) > > > > > > > at java.util.Properties.load(Unknown Source) > > > > > > > at rails.util.Config.load(Config.java:59) > > > > > > > at rails.util.Config.get(Config.java:40) > > > > > > > at rails.ui.swing.Options.initialize(Options.java:102) > > > > > > > at rails.ui.swing.Options.<init>(Options.java:214) > > > > > > > at > > rails.ui.swing.GameUILoader.<init>(GameUILoader.java:18) > > > > > > > at rails.test.GameTest.main(GameTest.java:34) > > > > > > > > > > > > > > > > > > > > > Any ideas on why getResourceAsStream() is returning null? > > > > > > > > > > > > > > > > > > > > > ---Brett > > > > > > > > > > > > > > > > > > > > > On 6/3/07, Erik Vos <eri...@hc...> wrote: > > > > > > > > In the past week I have parametrised most Collections > > > > > > > > and applied quite a number of for/in loops. > > > > > > > > Most of the Java 5 'Type Safety' warnings are gone now. > > > > > > > > Not all of them; generics have some limitations. > > > > > > > > > > > > > > > > Erik Vos > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > > > > > > ----------- > > > > > > > > This SF.net email is sponsored by DB2 Express > > > > > > > > Download DB2 Express C - the FREE version of DB2 > > > > express and take > > > > > > > > control of your XML. No limits. Just data. Click to > > > > get it now. > > > > > > > > http://sourceforge.net/powerbar/db2/ > > > > > > > > _______________________________________________ > > > > > > > > Rails-devel mailing list > > > > > > > > Rai...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > > > > > > ----------- > > > > > > > This SF.net email is sponsored by DB2 Express > > > > > > > Download DB2 Express C - the FREE version of DB2 > > > > express and take > > > > > > > control of your XML. No limits. Just data. Click to > > get it now. > > > > > > > http://sourceforge.net/powerbar/db2/ > > > > > > > _______________________________________________ > > > > > > > Rails-devel mailing list > > > > > > > Rai...@li... > > > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > > > > > ----------- > > > > > > This SF.net email is sponsored by DB2 Express > > > > > > Download DB2 Express C - the FREE version of DB2 > > express and take > > > > > > control of your XML. No limits. Just data. Click to > > get it now. > > > > > > http://sourceforge.net/powerbar/db2/ > > > > > > _______________________________________________ > > > > > > Rails-devel mailing list > > > > > > Rai...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > > > ----------- > > > > > This SF.net email is sponsored by DB2 Express > > > > > Download DB2 Express C - the FREE version of DB2 > > express and take > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > http://sourceforge.net/powerbar/db2/ > > > > > _______________________________________________ > > > > > Rails-devel mailing list > > > > > Rai...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > -------------------------------------------------------------- > > > > ----------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > -------------------------------------------------------------- > > ----------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |