Board index » jbuilder » package name different from file directory structory name

package name different from file directory structory name


2003-10-03 10:38:54 PM
jbuilder0
I want to have a package name that is is different from the file directory structure name.
When i attempt to do this, i get the following error:
"WLCygentModifyAccountDetails.java": Error #: 901 : package com.convergys.base stated in source C:\test\src\base\WLCygentModifyAccountDetails.java does not match directory base at line 23, column 23
IS THERE ANYWAY AROUND THIS?
 
 

Re:package name different from file directory structory name

"George Job" < XXXX@XXXXX.COM >wrote in message
Quote
IS THERE ANYWAY AROUND THIS?
No.
Depending on what you're trying to do, you might find it adequate to
create a folder in your project and put the package's files there.
Note that I'm not talking about a folder/directory in your actual file
system. Folders in a JBuilder project are pseudo-folders that are used
for organizational purposes only. Right click in the project pane and
choose New Folder to create one.
--
Gillmer J. Derge (TeamB)
 

Re:package name different from file directory structory name

George Job wrote:
Quote
I want to have a package name that is is different from the file
directory structure name.
I think the best answer to this is "don't do it". There are some
overwhelmingly accepted conventions for directory structure in relation
to package names, that are also enforced to some extent by the compiler
(in terms of where it will look for dependent class files, etc.)
I realize that your organization might have had some long-followed
conventions for C or C++ or VB source code, but Java is a totally
different beast (in fact, don't try to force your C++ conventions into a
Java mold), and the sooner you adopt the common conventions for Java
programming, especially file structure, the happier you will be in the
long run.
JBuilder is even more picky about file structure, especially for
projects with automatic source discovery (trust me, you really want
this feature - it makes project maintenance *so* much easier..).
 

{smallsort}