|
-
October 6th, 2000, 11:30 AM
#1
Class "must be defined in a file called" error
When compiling I get the following error:
/comm/client/MainClass.java:25: Public class comm.client.MainClass must be defined in a file called "MainClass.java".
The funny thing is that MainClass *is* defined in a file called MainClass.java, and all text has the correct case. I haven't any idea what else could be causing this error. Does anyone have any suggestions?
"There's nothing more dangerous than a resourceful idiot." ---Dilbert
BWAHAHAHAHAHAHA! ---Murray
-
October 7th, 2000, 05:05 PM
#2
Re: Class "must be defined in a file called" error
Hi
Try to right click your .java file and choose
properties, and see what the file is called.
Somtimes it can get saved as MainClass.java.txt
This has happened to me, so now when saving a
file i always put quote marks around it
"MainClass.java"
Hope this helps.
Phill
-
October 11th, 2000, 09:02 AM
#3
Re: Class "must be defined in a file called" error
Does your MainClass class have the line
package comm.client;
?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|