--- "Mark A. Flacy" <[EMAIL PROTECTED]> wrote:
> I sit partially corrected.
>
> A public class must sit in a file that matches the
> classname. A package
> level class does not. The directory where the
> source resides does not have
> to match in any fashion the package statement
> included in the source file.
>
> FWIW, in java 1.2.2 the error message contained
> "...must be defined in a
> file..."
Using Java 1.3, I still get similar output:
nyap:jpmpsdev@EQUINOX:~/proj/Asdf> cat Asdf.java
package Aoeu;
public class Aoeu
{
public static void main(String[] args)
{
System.out.println("Yo");
}
}
nyap:jpmpsdev@EQUINOX:~/proj/Asdf> javac -classpath .
Asdf.java
Asdf.java:3: class Aoeu is public, should be declared
in a file named Aoeu.java
public class Aoeu
^
1 error
mv Asdf.nyap:jpmpsdev@EQUINOX:~/proj/Asdf> mv
Asdf.java Asdf
nyap:jpmpsdev@EQUINOX:~/proj/Asdf> javac -classpath .
Asdf/Asdf.java
Asdf/Asdf.java:3: class Aoeu is public, should be
declared in a file named Aoeu.java
public class Aoeu
^
1 error
Noel
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs