 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rodrigo de Salvo Braz Guest
|
Posted: Wed Apr 14, 2004 11:13 pm Post subject: Error "Package does not match directory"? |
|
|
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
|
Posted: Wed Apr 14, 2004 11:53 pm Post subject: Re: Error "Package does not match directory"? |
|
|
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 |
|
 |
|
|
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
|
|