BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error "Package does not match directory"?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
Rodrigo de Salvo Braz
Guest





PostPosted: Wed Apr 14, 2004 11:13 pm    Post subject: Error "Package does not match directory"? Reply with quote



Hi,

I have just installed JBuilder X Foundation and made a project for my
existing code. In building it, I get tons of messages like this:

"Network.java": Package
C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java stated in source
ncsa.rsb.probrel.bp does not match directory
C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java. at line 1, column
26

The line with which this is associated is

package ncsa.rsb.probrel.bp;

In 'C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java'

I looked around and read somewhere that the source directory of the
non-matching project should be in the sources list of the Project's
properties. The directory 'C:cygwinhomeRodrigodevjavaprobrelbp' is
there.

A friend of mine looked at it and said that I should have a directory
structure exactly reflecting the package name. So in this case, according to
him, I should have a directory '...ncsarsbprobrelbp'. This is hard to
believe though, for the Java compiler itself does not pose such constraint,
and the fact that JBuilder allows for the addition of multiple source
directories seems to go against that.

I also find it weird that the error message calls
'C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java' a "package" and
ncsa.rsb.probrel.bp a "source". It seems to be inverting things.

Any help appreciated.

Best,

Rodrigo


Back to top
John McGrath [TeamB]
Guest





PostPosted: Wed Apr 14, 2004 11:53 pm    Post subject: Re: Error "Package does not match directory"? Reply with quote



On 4/14/2004 at 7:13:15 PM, Rodrigo de Salvo Braz wrote:

Quote:
"Network.java": Package
C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java stated in source
ncsa.rsb.probrel.bp does not match directory
C:cygwinhomeRodrigodevjavaprobrelbpNetwork.java. at line 1,
column 26

I looked around and read somewhere that the source directory of the
non-matching project should be in the sources list of the Project's
properties. The directory 'C:cygwinhomeRodrigodevjavaprobrelbp'
is there.

The source should be kept in a directory structure that matches the
package structure and the *root* of that directory structure must be in
the source path.

For example, if you have a class named "Network.java" in a package named
"ncsa.rsb.probrel.bp" and the source path contains the root directory
"C:cygwinhomeRodrigoprojectsource", then the source file should be
"C:cygwinhomeRodrigoprojectsourcencsarsbprobrelbpNetwork.java"

--
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.