[5354] in java-interest
Re: stupid question
daemon@ATHENA.MIT.EDU (Richard Ching {Imonics})
Tue Feb 6 13:28:06 1996
Date: Thu, 1 Feb 1996 15:41:24 -0500
From: richard@aisgfl.gct.com (Richard Ching {Imonics})
To: larryr@CyberGate.COM
Cc: java-interest@java.sun.com
Agreed! I hope Java team was watching this email and change this
implementation in a later release.
Thanx
Richard Ching
> From larryr@CyberGate.COM Thu Feb 1 15:15:14 1996
> Date: Thu, 01 Feb 1996 12:00:49 -0800
> From: Larry Rau <larryr@CyberGate.COM>
> Organization: not likely
> X-Mailer: Mozilla 2.0b6a (Win95; I)
> Mime-Version: 1.0
> To: Richard Ching {Imonics} <richard@aisgfl.gct.com>
> Subject: Re: stupid question
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Content-Length: 1980
>
> Richard Ching {Imonics} wrote:
> >
> > if you type javac helloworld.java, the compiler comes back and tell you
> > that HelloWorld class must defined in a source file call HelloWorld.java
> >
> > However, if you type javac HelloWorld.java (Windows 95 is not case sensitive
> > on file name), it will work fine.
> >
> > I do not see the significance of requiring the source file name the same as
> > the class name when the class declared as public. I have not yet look
> > into Java's language specification. May be James or Author can answer this
> > question.
> > This is mostly a implementation issue and not a Java Language issue. In sun's
> implementation they rely on being able to search directories of class files
> based on names. Thus they store one class per file. You will notice you can
> define more then one class per java file (as long as only one is public) but
> javac will still create a single class file for each class. Since the java
> language is case sensitive class HelloWorld and class Helloworld are two distinct
> classes. The implementation chose to rely on file names to find classes and
> on UNIX where it was born this was easy since unix allows long names and is
> case sensitive. If this is not true the the implementation would just need some
> other way to locate classes, etc. On Win95 (and NT) the filesystem (finally)
> allows long filenames and still is NOT case sensitive, but it will preserve case.
> So their implementation did not have to change. Since I work on both Solaris
> and Win95 I do not have too much problem as I'm am used to referring to files
> using a specific case (my fingers just do this automagically). For those who
> only work on Win95 I can understand why this seems strange and why it would get
> in the way -- if you don't have to type HeLlOwOrLd why do it! :)
>
> Obviously the implementation could be changed to eliminate the need for case
> sensitivity on .class files but I'm sure it is not a priority.
>
> ......all this is just my opinion......larry
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com