
Signature
Knute Johnson
email s/nospam/knute/
>>> I'm hoping there is just something syntactically wrong with the
>>> following. I've verified that the file exists, but it keeps saying
[quoted text clipped - 13 lines]
> You've probably just typed something wrong somewhere. Since you are a
> unix fan you can use the / instead of the \\.
Only if you want to break any routine that depends on File.separator.
Ray

Signature
This signature intentionally left blank.
Chris Uppal - 30 Jan 2006 15:31 GMT
> > You've probably just typed something wrong somewhere. Since you are a
> > unix fan you can use the / instead of the \\.
>
> Only if you want to break any routine that depends on File.separator.
Any routine that depends carelessly on File.separator being the /only/
allowable path separator for the platform is already broken.
'/' has been a legal path separator on M$-ware since at least MS-DOS 3.
Incidentally, the Sun implementation of File normalises paths to use '\\'
throughout (on Windows). That's probably a good idea, since otherwise
File.separator would be totally useless rather than merely dangerously
misleading. But I don't know if it is documented to do so; if not then relying
on that aspect of its behaviour may not be justifiable in production code.
-- chris
Dimitri Maziuk - 30 Jan 2006 17:22 GMT
Chris Uppal sez:
>> > You've probably just typed something wrong somewhere. Since you are a
>> > unix fan you can use the / instead of the \\.
[quoted text clipped - 11 lines]
> misleading. But I don't know if it is documented to do so; if not then relying
> on that aspect of its behaviour may not be justifiable in production code.
I don't know what File normalises paths to, but IME
"some/path/some/file" works on both unix and winders whereas
"\\some\\path\\some\\file" is M$-only. Handy when you want to
read paths from a properties file.
Another undocumented trick is "java foo/bar/MyClass" -- you can
use tab-completion on unix command line.
Dima

Signature
Backwards compatibility is either a pun or an oxymoron. -- PGN
Roedy Green - 30 Jan 2006 22:04 GMT
On Mon, 30 Jan 2006 14:46:37 GMT, Raymond DeCampo
<nospam@twcny.rr.com> wrote, quoted or indirectly quoted someone who
said :
>>>> String filename = "C:\\Java\\j2sdk1.4.2_10\\jre\\bin\\java";
your file is called "java..exe" not "java"

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.