For Programmers: Free Programming Magazines  


Home > Archive > Java Help > May 2004 > Package Problems









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Package Problems
pageV

2004-05-04, 4:03 pm

I am doing an example from java.sun.com. I have several files all with
package divelog. The first puzzle is that DiveHandler requires
import divelog.UIWestPanel;
import divelog.DiveRecord;
to access those classes, even though all the files are in the same package.
DiveLog requires no import statements to access several files.

The error that really stops me is

divelog\Dives.java:12: cannot access divelog.DiveHandler

bad class file: .\divelog\DiveHandler.class

class file contains wrong class: DiveHandler

Please remove or make sure it appears in the correct subdirectory of the
classpath.

import divelog.DiveHandler;

I have checked the spelling and it is correct.
I am running this on Kawa. I went to a dos window and
tried javac and got the same error.

Ralph


pageV

2004-05-04, 4:03 pm

Nevermind, I discovered one file missing a package statement.
"pageV" <vralphv@yahoo.com> wrote in message
news:c76cdj$9era$1@ID-137509.news.uni-berlin.de...
> I am doing an example from java.sun.com. I have several files all with
> package divelog. The first puzzle is that DiveHandler requires
> import divelog.UIWestPanel;
> import divelog.DiveRecord;
> to access those classes, even though all the files are in the same

package.
> DiveLog requires no import statements to access several files.
>
> The error that really stops me is
>
> divelog\Dives.java:12: cannot access divelog.DiveHandler
>
> bad class file: .\divelog\DiveHandler.class
>
> class file contains wrong class: DiveHandler
>
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
>
> import divelog.DiveHandler;
>
> I have checked the spelling and it is correct.
> I am running this on Kawa. I went to a dos window and
> tried javac and got the same error.
>
> Ralph
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com