Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #5436 > unrolled thread
| Started by | Gene Wirchenko <genew@ocis.net> |
|---|---|
| First post | 2011-06-20 14:24 -0700 |
| Last post | 2011-06-23 15:13 -0400 |
| Articles | 20 on this page of 96 — 22 participants |
Back to article view | Back to comp.lang.java.programmer
CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 14:24 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-20 14:48 -0700
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-20 18:49 -0300
Re: CLI Java Glitch Martin Gregorie <martin@address-in-sig.invalid> - 2011-06-20 22:09 +0000
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-21 10:16 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:49 +0100
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-21 15:11 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 16:37 -0700
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-21 17:54 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 20:58 -0400
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-07-21 18:14 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:19 -0400
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-07-22 19:45 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 23:17 -0400
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-07-22 20:25 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 23:38 -0400
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-07-23 09:09 -0700
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-07-22 18:41 +1000
Re: CLI Java Glitch Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-07-25 11:25 +0000
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-22 09:02 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:12 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 10:39 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 09:50 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 19:44 +0100
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 12:31 -0400
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-23 23:04 +0100
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-23 21:40 -0700
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-24 09:43 -0400
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 12:24 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 14:32 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 09:12 -0700
Re: CLI Java Glitch Bent C Dalager <bcd@pvv.ntnu.no> - 2011-06-24 22:49 +0000
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:29 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 16:29 -0700
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-22 11:54 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:16 -0700
Re: CLI Java Glitch Patricia Shanahan <pats@acm.org> - 2011-06-22 11:06 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 11:46 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 12:50 -0700
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-23 15:23 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 08:58 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 08:58 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-24 11:36 -0700
Re: CLI Java Glitch Paul Cager <paul.cager@googlemail.com> - 2011-06-22 14:45 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 23:29 +0100
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 18:08 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-23 23:20 +0100
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-24 10:28 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-25 22:58 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:31 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 09:00 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:33 -0400
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:38 -0400
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:41 -0400
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 20:00 +0100
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-23 15:18 +0100
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:29 -0400
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-23 11:40 +1000
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-23 20:21 +1000
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 09:00 -0700
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-24 10:24 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:52 +0100
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 19:11 -0400
Re: CLI Java Glitch Lew Bloch <lewisbloch@google.com> - 2011-06-20 16:25 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 19:45 -0400
Re: CLI Java Glitch Lew Bloch <lewisbloch@google.com> - 2011-06-20 18:28 -0700
Ping: Lew Bloch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 23:26 -0400
Re: Ping: Lew Bloch Lew Bloch <lewisbloch@google.com> - 2011-06-21 10:25 -0700
Re: Ping: Lew Bloch Jeff Higgins <jeff@invalid.invalid> - 2011-06-21 14:36 -0400
Re: CLI Java Glitch Patricia Shanahan <pats@acm.org> - 2011-06-20 17:02 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 20:37 -0400
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 20:44 -0400
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:45 +0100
Re: CLI Java Glitch Roedy Green <see_website@mindprod.com.invalid> - 2011-06-20 16:55 -0700
Re: CLI Java Glitch Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-20 20:44 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 19:26 -0700
Re: CLI Java Glitch Paul Cager <paul.cager@googlemail.com> - 2011-06-21 02:34 -0700
Re: CLI Java Glitch Silvio <silvio@moc.com> - 2011-06-21 16:50 +0200
Re: CLI Java Glitch "Gavino" <invalid@invalid.invalid> - 2011-06-21 21:35 +0200
Re: CLI Java Glitch Roedy Green <see_website@mindprod.com.invalid> - 2011-06-21 11:59 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 13:03 -0700
Re: CLI Java Glitch BGB <cr88192@hotmail.com> - 2011-06-21 14:21 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:45 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 19:29 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:42 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 14:48 -0700
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:47 -0400
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-21 21:52 -0400
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-22 07:56 -0300
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-22 08:02 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:18 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-22 15:01 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 12:54 -0700
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-22 18:52 -0300
Re: CLI Java Glitch Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 17:50 -0400
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 15:13 -0400
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-06-23 08:58 -0700 |
| Message-ID | <2do60713no4mvf4t8elsppdt5qcpmidlcj@4ax.com> |
| In reply to | #5576 |
On Thu, 23 Jun 2011 15:23:26 +0100, Nigel Wade <nmw-news@ion.le.ac.uk>
wrote:
>On 22/06/11 20:50, Gene Wirchenko wrote:
>> On 22 Jun 2011 19:45:02 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
>> wrote:
>>
>> [snip]
>>
>>> Programmers usually are grateful to get error reports as
>>> soon as possible.
>>
>> We are even more grateful not to have something flagged as an
>> error when it is not, or when it need not be.
>
>But in your original post it is an error. Java is case-sensitive and the
>class you asked for does not exist. Therefore it has to be flagged as an
>error.
>
>If Java were to start guessing what you might have intended anarchy
>would result. What if you wanted to run your class called deletefiles
I have already posted a solution. It is not anarchy. On a
case-insensitive filesystem:
search for filename
How many?
0: throw not found
1: run it regardless of case
2+: Is one of them a case match?
Yes: run that one
No: throw ambiguous name
>(which prompts you before deleting any files), but Java wasn't able to
>find that because you'd got your classpath wrong, or for some other
>reason. But it did find a class called DeleteFiles (a similar class, but
>it deletes everything without asking) so ran that for you instead. What
See above. That would be ambiguous. I had not thought of the
path, but would not mind seeing a slightly longer startup by running
through all of the directories. Run the first exact case match if
there is one. If not, run the first match in a directory. If there
is more than one case-insensitive match in a directory, throw an
error.
>if the class it found had different constructors, or methods, and your
>code crashed in strange and wonderful ways? Would you still think that
>randomly substituting a class for something which was superficially
>similar in name was a good idea?
It is not randomly substituting, just disregarding case.
>Sloppy user thinking should not be encouraged. Whilst it may make the
>user's life a little easier in some cases, that small benefit is grossly
>outweighed when it blows up in their face
Boy, do you ever exaggerate to make your case.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | lewbloch <lewbloch@gmail.com> |
|---|---|
| Date | 2011-06-24 08:58 -0700 |
| Message-ID | <1599ac82-3650-4c39-b7ab-7a22018488fc@y13g2000prb.googlegroups.com> |
| In reply to | #5541 |
Gene Wirchenko wrote: > Stefan Ram wrote: >> The most successful programming languages today are Java, C >> and C++, all case-sensitive. There are case-insensitive >> languages, but they are less successful. Implementations of >> these successful and popular languages Java, C, and C++ >> actually throw error messages upon case errors. > > Correlation is not causation. > Spouting aphorisms is not rebuttal. -- Lew
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-06-24 11:36 -0700 |
| Message-ID | <i3m907ddqdc9a1bvi9jt4paasf6mbe2vrj@4ax.com> |
| In reply to | #5646 |
On Fri, 24 Jun 2011 08:58:02 -0700 (PDT), lewbloch
<lewbloch@gmail.com> wrote:
>Gene Wirchenko wrote:
>> Stefan Ram wrote:
>>> The most successful programming languages today are Java, C
>>> and C++, all case-sensitive. There are case-insensitive
>>> languages, but they are less successful. Implementations of
>>> these successful and popular languages Java, C, and C++
>>> actually throw error messages upon case errors.
>> Correlation is not causation.
>Spouting aphorisms is not rebuttal.
I was not rebutting. I was stating that your statement did not
prove your point.
C might be successful in spite of it being case-sensitive. Or
that might be a total disconnect from its success.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Paul Cager <paul.cager@googlemail.com> |
|---|---|
| Date | 2011-06-22 14:45 -0700 |
| Message-ID | <ff9e9d68-d80f-41c8-883b-6bdc8815701e@eb1g2000vbb.googlegroups.com> |
| In reply to | #5534 |
On Jun 22, 7:46 pm, Gene Wirchenko <ge...@ocis.net> wrote: > On Wed, 22 Jun 2011 11:06:38 -0700, Patricia Shanahan <p...@acm.org> > wrote: > >Of course, javac and java are both used by many users. How do you > >propose to let "the user" be the one to prevail, when there are > >thousands of users with different backgrounds and interface expectations? > > Easy on this point. Accepting case-insensitive filenames as > matching when there is no ambiguity is more helpful to more users than > throwing an error is. My preference is to retain the current situation where the 'java' command consistently rejects a wrong classname. I prefer consistent behaviour over the ability to type the class name without pressing the shift key (in most cases). Your preference, I believe, is the opposite. I don't think either of us should present our personal preference as being "more helpful to more users" without being reasonably certain that we speak for the majority of users.
[toc] | [prev] | [next] | [standalone]
| From | Tom Anderson <twic@urchin.earth.li> |
|---|---|
| Date | 2011-06-22 23:29 +0100 |
| Message-ID | <alpine.DEB.2.00.1106222327360.17013@urchin.earth.li> |
| In reply to | #5534 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, 22 Jun 2011, Stefan Ram wrote: > The word »Cuban« means »related to Cuba«, > while »cuban« means »related to cubes«. I don't believe it does - i've never heard that word before - but i will certainly use it to mean that in future. > When I made a case-related mistake in a dictation exercise > in school, the teacher marked that as an error and gave me a > worse grade, which in turn helped me to learn the language. Was this in English or German (or something else)? I don't know German, but i've been told that case is much more significant in German than in English. tom -- drink beer and forget about gods. -- derslangerman
[toc] | [prev] | [next] | [standalone]
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Date | 2011-06-22 18:08 -0700 |
| Message-ID | <itu3m7$jdr$2@dont-email.me> |
| In reply to | #5553 |
On 6/22/2011 3:29 PM, Tom Anderson wrote: > Was this in English or German (or something else)? I don't know > German, but i've been told that case is much more significant in > German than in English. A classic bash.org quote: > Capitalization is the difference between "I helped my uncle Jack off > a horse" and "I helped my uncle jack off a horse" -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
[toc] | [prev] | [next] | [standalone]
| From | Tom Anderson <twic@urchin.earth.li> |
|---|---|
| Date | 2011-06-23 23:20 +0100 |
| Message-ID | <alpine.DEB.2.00.1106232311030.31514@urchin.earth.li> |
| In reply to | #5553 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, 23 Jun 2011, Stefan Ram wrote: > Tom Anderson <twic@urchin.earth.li> writes: >>> The word »Cuban« means »related to Cuba«, >>> while »cuban« means »related to cubes«. >> I don't believe it does - i've never heard that word before - but i will >> certainly use it to mean that in future. > > http://mathworld.wolfram.com/CubanPrime.html > http://en.wikipedia.org/wiki/Cuban_prime > > http://en.wikipedia.org/wiki/Cuban_hip_hop > http://en.wikipedia.org/wiki/Cuban_Revolution I'm aware of the use of Cuban to mean 'pertaining to Cuba'. I was not previously aware of the use of the word 'cuban' in relation to certain primes related to cubic numbers - interesting! However, i am still not aware of any *other* uses of cuban in connection with cubes, and i suspect the name is a humorous idiosyncracy of this Cunningham chap who defined them. I had a look for the paper where he did so, but i can't even find a citation, let alone a copy. In normal use, you use 'cubic' as the adjective for cubes; i think mathematicians and laymen alike would correct you if you said 'cuban'. > http://en.wikipedia.org/wiki/Capitonym In English, we do capitalise proper nouns, it's true. The examples in that list that aren't proper nouns are highly dubious. >>> When I made a case-related mistake in a dictation exercise in school, >>> the teacher marked that as an error and gave me a worse grade, which >>> in turn helped me to learn the language. >> >> Was this in English or German (or something else)? > > in German. > >> I don't know German, but i've been told that case is much more >> significant in German than in English. > > There are more words beginning with an uppercase letter (I > am thinking of nouns, which always begin with an uppercase > letter), so one can find more examples of minimal pairs. > > OTOH, »I« is written in uppercase in English, while the > corresponding German word is not. Oh, that's just a modern typesetting fad. It's not intrinsically uppercase. tom -- Yulava? Niob Yam!
[toc] | [prev] | [next] | [standalone]
| From | Esmond Pitt <esmond.pitt@bigpond.com> |
|---|---|
| Date | 2011-06-24 10:28 +1000 |
| Message-ID | <4e03da2a$0$57114$c30e37c6@exi-reader.telstra.net> |
| In reply to | #5606 |
On 24/06/2011 8:20 AM, Tom Anderson wrote: > Oh, that's just a modern typesetting fad. It's not intrinsically uppercase. This statement doesn't really mean anything. *All* uppercase is a 'typesetting fad'; nothing is intrinsically uppercase. Or lowercase.
[toc] | [prev] | [next] | [standalone]
| From | Tom Anderson <twic@urchin.earth.li> |
|---|---|
| Date | 2011-06-25 22:58 +0100 |
| Message-ID | <alpine.DEB.2.00.1106252257270.10866@urchin.earth.li> |
| In reply to | #5617 |
On Fri, 24 Jun 2011, Esmond Pitt wrote: > On 24/06/2011 8:20 AM, Tom Anderson wrote: >> Oh, that's just a modern typesetting fad. It's not intrinsically uppercase. > > This statement doesn't really mean anything. *All* uppercase is a > 'typesetting fad'; nothing is intrinsically uppercase. Or lowercase. YOU KNOW YOURE QUITE RIGHT THIS MAKES MY LIFE SUBSTANTIALLY EASIER THANKS ONCE AGAIN MR PITT TOM -- space, robots, pirates, vikings, ninjas, medieval castles, dinosaurs, cities, suburbia, holiday locations, wild west, the Arctic, airports, boats, racing cars, trains, Star Wars, Harry Potter, Spider-Man, Batman, SpongeBob SquarePants, Avatar: The Last Airbender and more
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-06-26 20:31 -0700 |
| Message-ID | <o9uf07hrpiu773k3ukof6436482kbcds8o@4ax.com> |
| In reply to | #5673 |
On Sat, 25 Jun 2011 22:58:02 +0100, Tom Anderson <twic@urchin.earth.li> wrote: >On Fri, 24 Jun 2011, Esmond Pitt wrote: > >> On 24/06/2011 8:20 AM, Tom Anderson wrote: >>> Oh, that's just a modern typesetting fad. It's not intrinsically uppercase. >> >> This statement doesn't really mean anything. *All* uppercase is a >> 'typesetting fad'; nothing is intrinsically uppercase. Or lowercase. > >YOU KNOW YOURE QUITE RIGHT THIS MAKES MY LIFE SUBSTANTIALLY EASIER THANKS >ONCE AGAIN MR PITT EVENBEFORETHENTHEREWERENOSPACESBETWEENWORDS Sincerely, Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | lewbloch <lewbloch@gmail.com> |
|---|---|
| Date | 2011-06-24 09:00 -0700 |
| Message-ID | <6fbe9e94-2f90-4877-a9c0-17f1c82009d2@35g2000prp.googlegroups.com> |
| In reply to | #5553 |
Tom Anderson wrote: > Was this in English or German (or something else)? I don't know German, > but i've [sic] been told that case is much more significant in German than in > English. > Case matters in English, too. Perhaps you think it doesn't matter in English so much because you flout it. -- Lew
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-07-22 17:33 -0400 |
| Message-ID | <4e29ecae$0$305$14726298@news.sunsite.dk> |
| In reply to | #5534 |
On 6/22/2011 2:46 PM, Gene Wirchenko wrote: > While I am at it, I find the Java error for not finding a program > to be rather verbose for little use. It very specifically tell what the problem is. The exception is very useful. The gotcha is that understanding the exception requires some knowledge about Java classes, classpath, classloaders, interaction with file system etc.. It is not beginner friendly. In two years you will consider the exception text very logical. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-07-22 17:38 -0400 |
| Message-ID | <4e29edc5$0$305$14726298@news.sunsite.dk> |
| In reply to | #5534 |
On 6/22/2011 2:46 PM, Gene Wirchenko wrote: > On Wed, 22 Jun 2011 11:06:38 -0700, Patricia Shanahan<pats@acm.org> > wrote: > >> On 6/22/2011 10:16 AM, Gene Wirchenko wrote: >> ... >>> Being perfectly correct is not good enough when playing with >>> others who may well have other priorities. When a program and a user >>> conflict over interface issues, I think that the user should be the >>> one to prevail. >> >> When dealing with a single-user program that makes sense. >> >> Of course, javac and java are both used by many users. How do you >> propose to let "the user" be the one to prevail, when there are >> thousands of users with different backgrounds and interface expectations? > > Easy on this point. Accepting case-insensitive filenames as > matching when there is no ambiguity is more helpful to more users than > throwing an error is. Actually it did in your case. The java command on Windows do lookup files case insensitive. But you get an error if the Java byte code in the file does not contain the class name you specified. And Java class name are case sensitive on all platforms. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-07-22 17:41 -0400 |
| Message-ID | <4e29eea0$0$311$14726298@news.sunsite.dk> |
| In reply to | #5534 |
On 6/22/2011 3:45 PM, Stefan Ram wrote: > The most successful programming languages today are Java, C > and C++, all case-sensitive. There are case-insensitive > languages, but they are less successful. Implementations of > these successful and popular languages Java, C, and C++ > actually throw error messages upon case errors. C/C++, Java, C# : case sensitive PHP : mix of case sensitive and case insensitive VB.NET : case insensitive 3.5 out of 5 in my book. Arne
[toc] | [prev] | [next] | [standalone]
| From | Tom Anderson <twic@urchin.earth.li> |
|---|---|
| Date | 2011-06-22 20:00 +0100 |
| Message-ID | <alpine.DEB.2.00.1106221950030.10728@urchin.earth.li> |
| In reply to | #5518 |
On Wed, 22 Jun 2011, Nigel Wade wrote: > On 21/06/11 22:49, Tom Anderson wrote: >> On Tue, 21 Jun 2011, Esmond Pitt wrote: >> >>> On 21/06/2011 8:09 AM, Martin Gregorie wrote: >>> >>>> The Java language system does case-sensitive comparisons between class >>>> names and the files that contain them when checking that a class name >>>> matches the file name that contains it >>> >>> Nitpicking, but it doesn't really do that, does it. It opens a .class >>> file of the name the user specified, loads the class(es) it contains, >>> and tries to find the classname it was looking for among those >>> classes. It doesn't explicitly compare the filename and the classname. >>> The operating system gave it HelloWorld.class in response to >>> 'helloworld.class' because that's how the OS file system happened to >>> work. >> >> The way Java does this at the moment means that 'java helloworld', >> where there is no class 'helloworld', does different things on Windows >> depending on whether there is a class HelloWorld, hElLoWoRlD, >> HelloworlD, etc. > > Does it? What different thing does it do? To clarify, i meant that it does different things in these three situations: (1) helloworld exists (2) HelloWorld, hElLoWoRlD, HelloworlD, or similar exists (3) no class case-insensitively called helloworld exists I think that cases (2) and (3) should do the same thing. Or, as you describe it: > Java actually throws ClassNotFoundException in all cases, on all OS, > just as it should. The only difference is that in a case-insensitive > filesystem Java actually opens the case-insensitive filename before it > discovers that it does not contain the class required. On case-sensitive > filesystems the correct case filename won't be found. The actual result > is the same in both cases, a ClassNotFoundException. Now, this is where i think i've gone wrong. Back when i used Windows, java did *not* do the same thing in cases (2) and (3). For the nonexistent file in (3), it would throw a NoClassDefFoundError. But for the misnamed file in (2), it would throw something else - a ClassFormatError, i think. It seems that this has been fixed without me noticing, and i failed to interpret Gene's original post correctly. If this is the case, then i withdraw my complaint entirely! tom -- It is a formal cultural policy to show unreasonable bias towards any woman who is both attractive and weird.
[toc] | [prev] | [next] | [standalone]
| From | Nigel Wade <nmw-news@ion.le.ac.uk> |
|---|---|
| Date | 2011-06-23 15:18 +0100 |
| Message-ID | <96h0aiFf86U1@mid.individual.net> |
| In reply to | #5537 |
On 22/06/11 20:00, Tom Anderson wrote: > On Wed, 22 Jun 2011, Nigel Wade wrote: > >> On 21/06/11 22:49, Tom Anderson wrote: >>> On Tue, 21 Jun 2011, Esmond Pitt wrote: >>> >>>> On 21/06/2011 8:09 AM, Martin Gregorie wrote: >>>> >>>>> The Java language system does case-sensitive comparisons between class >>>>> names and the files that contain them when checking that a class name >>>>> matches the file name that contains it >>>> >>>> Nitpicking, but it doesn't really do that, does it. It opens a >>>> .class file of the name the user specified, loads the class(es) it >>>> contains, and tries to find the classname it was looking for among >>>> those classes. It doesn't explicitly compare the filename and the >>>> classname. The operating system gave it HelloWorld.class in response >>>> to 'helloworld.class' because that's how the OS file system happened >>>> to work. >>> >>> The way Java does this at the moment means that 'java helloworld', >>> where there is no class 'helloworld', does different things on >>> Windows depending on whether there is a class HelloWorld, hElLoWoRlD, >>> HelloworlD, etc. >> >> Does it? What different thing does it do? > > To clarify, i meant that it does different things in these three > situations: > > (1) helloworld exists > (2) HelloWorld, hElLoWoRlD, HelloworlD, or similar exists > (3) no class case-insensitively called helloworld exists > > I think that cases (2) and (3) should do the same thing. Or, as you > describe it: > >> Java actually throws ClassNotFoundException in all cases, on all OS, >> just as it should. The only difference is that in a case-insensitive >> filesystem Java actually opens the case-insensitive filename before it >> discovers that it does not contain the class required. On >> case-sensitive filesystems the correct case filename won't be found. >> The actual result is the same in both cases, a ClassNotFoundException. > > Now, this is where i think i've gone wrong. Back when i used Windows, > java did *not* do the same thing in cases (2) and (3). For the > nonexistent file in (3), it would throw a NoClassDefFoundError. But for > the misnamed file in (2), it would throw something else - a > ClassFormatError, i think. > > It seems that this has been fixed without me noticing, and i failed to > interpret Gene's original post correctly. If this is the case, then i > withdraw my complaint entirely! > > tom > Well, I was testing on Windows 7 with NTFS (that's the only Windows system I have to hand, I don't normally use Windows). It may well be different on other version of Windows, or with vFAT. -- Nigel Wade
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-07-22 17:29 -0400 |
| Message-ID | <4e29ebb1$0$305$14726298@news.sunsite.dk> |
| In reply to | #5518 |
On 6/22/2011 6:54 AM, Nigel Wade wrote:
> On 21/06/11 22:49, Tom Anderson wrote:
>> On Tue, 21 Jun 2011, Esmond Pitt wrote:
>>
>>> On 21/06/2011 8:09 AM, Martin Gregorie wrote:
>>>
>>>> The Java language system does case-sensitive comparisons between class
>>>> names and the files that contain them when checking that a class name
>>>> matches the file name that contains it
>>>
>>> Nitpicking, but it doesn't really do that, does it. It opens a .class
>>> file of the name the user specified, loads the class(es) it contains,
>>> and tries to find the classname it was looking for among those
>>> classes. It doesn't explicitly compare the filename and the classname.
>>> The operating system gave it HelloWorld.class in response to
>>> 'helloworld.class' because that's how the OS file system happened to
>>> work.
>
>>
>> The way Java does this at the moment means that 'java helloworld', where
>> there is no class 'helloworld', does different things on Windows
>> depending on whether there is a class HelloWorld, hElLoWoRlD,
>> HelloworlD, etc.
>
>
> Does it? What different thing does it do?
>
> As far as a case-insensitive OS/filesystem is concerned, they would all
> appear as the same file. If Java asked for any of those names from the
> filesystem it would get the one file which did exist for any of the
> class names. It would then look in that file for the class it required.
> If the class did not exist in that file it would throw the
> ClassNotFoundException. It cannot do anything else because the
> OS/filesystem simply will not allow it.
The argument is a class name not a file name.
And even on Windows you can have helloworld, HelloWorld and hELLOwORLD.
Classpath is not restricted to current directory.
You can have each of the above class files in different directories
or jar files.
>> That seems pretty shoddy to me. If you're a case-sensitive program
>> running on a case-insensitive operating system, i think it falls on you
>> to pay special attention to case in your dealings with that system: when
>> java opens a class file, it ought to check that the name of the file
>> it's opened actually has the right case, and if it doesn't, discard it,
>> and act as if it had got a file not found error from the operating system.
>
> But Java cannot do this. On a case-insensitve OS/filesystem it simply
> may not be possible for a file to exist called HelloWorld.class.
It does not need to.
OpenVMS with an ODS-2 disk system has all uppercase file names.
You write:
java "HelloWorld"
and Java find HELLOWORLD.CLASS !
> Java is not doing anything wrong. The user is, in assuming that because
> the OS/filesystem is case-insensitive that Java is also. The java
> command syntax is "java<ClassName>" not "java<filename>".
Yes.
> That class
> name is case sensitive, no matter how brain dead the OS or filesystem.
> If you ask Java to run the class helloworld when your class is actually
> HelloWorld, you have asked it to do the wrong thing. Java is perfectly
> correct in telling you this.
>
> If you ask Java to run the class HelloWorld, it does so even on a
> case-insensitive system such as that of the OP. Even if the file is
> called helloworld.class Java still manages to do the right thing.
Yes.
Arne
[toc] | [prev] | [next] | [standalone]
| From | Esmond Pitt <esmond.pitt@bigpond.com> |
|---|---|
| Date | 2011-06-23 11:40 +1000 |
| Message-ID | <4e02999a$0$57110$c30e37c6@exi-reader.telstra.net> |
| In reply to | #5491 |
On 22/06/2011 7:49 AM, Tom Anderson wrote: > when java opens a class file, it ought to check that the name of the file > it's opened actually has the right case How? How can it get the name of the file it has just opened?
[toc] | [prev] | [next] | [standalone]
| From | Esmond Pitt <esmond.pitt@bigpond.com> |
|---|---|
| Date | 2011-06-23 20:21 +1000 |
| Message-ID | <4e0313bc$0$57116$c30e37c6@exi-reader.telstra.net> |
| In reply to | #5562 |
On 23/06/2011 12:01 PM, Stefan Ram wrote: > > The spelling of an entry can be obtained in an > operating-system dependent manner. For example, under > Microsoft® Windows: That assumes that the file hasn't been renamed between opening and running 'dir', or the other way around. As a solution to this non-existent problem it doesn't convince. What would be required, if anything was a method that turned an fd into a filename. Is there one? Or are we really expecting the JVM to run external processes or scan directories every time the JVM opens a .class file? to no purpose when what it already does addresses the issue entirely?
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-06-23 09:00 -0700 |
| Message-ID | <doo607lspagg4erhmr9lgvetr5h144jt68@4ax.com> |
| In reply to | #5562 |
On Thu, 23 Jun 2011 11:40:38 +1000, Esmond Pitt
<esmond.pitt@bigpond.com> wrote:
>On 22/06/2011 7:49 AM, Tom Anderson wrote:
>> when java opens a class file, it ought to check that the name of the file
>> it's opened actually has the right case
>
>How? How can it get the name of the file it has just opened?
How can it open a file without the filename? Just keep that
name.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
Back to top | Article view | comp.lang.java.programmer
csiph-web