[5144] in java-interest

home help back first fref pref prev next nref lref last post

Re: stupid question

daemon@ATHENA.MIT.EDU (Mete Senocak)
Tue Jan 30 04:47:33 1996

Date: Tue, 30 Jan 1996 00:17:01 -0800
From: Mete Senocak <msenocak@arachnid.microweb.com>
To: James Waldrop <sulam@construct.net>
Cc: java-interest@java.sun.com

Hi James:

James Waldrop wrote:
> 
> Ok, so I have a dumb question...  ;)
> 
> Let's say I am getting a warning like the following:
> 
> Foo.java:108: Warning: Public class ImagePanel must be defined in a file called "ImagePanel.java".
> public class ImagePanel extends Panel {
>              ^
> Foo.java:121: Warning: Public class RenderArea must be defined in a file called "RenderArea.java".
> public class RenderArea extends Canvas {
> 
> I can stick these in a seperate file, sure, but I'm finding it difficult
> to do that and then import them.  Also, I see a lot of other applets
> with multiple class definitions in one file, so I'm wondering what other
> people do to get around this warning.
> 
> James
> 
> --
> James Waldrop                        /          Technical Director
> sulam@construct.net              /              Construct Internet Design
> sulam@well.com               /                  http://www.construct.net

I don't have any detailed information about your file(s) but you will 
get this warning if you define the class ImagePanel in the file 
imageFile or Imagefile or imagefile (you get it, Java compiler is case 
sensitive and expects the file name correspond to class name 100%).  I 
had the same warnings on a Win95 platform.  BTW: You also have to be 
case sensitive in your command 'javac <filename>' also.

Good luck,

- Mete
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post