Case sensitivity in "getResourceAsStream(...)"? [message #297422] |
Fri, 13 January 2006 09:24  |
Eclipse User |
|
|
|
This is Eclipse 3.1.1 on WinXP.
We just encountered a strange failure which ->seems to be caused by
different case-sensitivity of "getResourceAsStream(...)" between when
the plugin was installed and run in a "real" instance of Eclipse and
when the plugin was run from a Plug-in Development perspective in a
instance of Eclipse spawned from the IDE.
It's a simple case of
InputStream ff =this.getClass().getResourceAsStream(fileName);
where "fileName" is just the base filename, not decorated with any
path or leading "/".
It turns out that the "fileName" string differed from the actual
name of the file in case, but was otherwise spelled correctly.
When run from a spawned instance of Eclipse from the development
envirionment, either through "Run" or "Debug", getResourceAsStream()
found and opened the file.
When the product was actually installed in an instance of Eclipse and
Eclipse was run as an application, the call returned "null".
When the string representation of the filename was corrected, the
call worked in both cases.
Is this a bug, or is something else going on?
--
Bert Hyman | Unisys - Roseville MN
bert.hyman@unisys.com | (651) 635-7791 | net2: 524-7791
|
|
|
|
|
Re: Case sensitivity in "getResourceAsStream(...)"? [message #297464 is a reply to message #297425] |
Sat, 14 January 2006 19:02  |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
One possibility is to mount a share that is on a remote Linux server that enforces case-sensitivity. Another is to have an NFS-mounted share which you can write files to.
Of course, if you've got a Linux box, you could always run your tests on that :-)
Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.08109 seconds