Board index » jbuilder » Creating packages and projects with JBuilder 9 Personal

Creating packages and projects with JBuilder 9 Personal

2003-08-12 02:36:06 AM
Hello TeamB,
I hope you can answer this, I have spent probably 10 hours trying to figure this out on my own and am extremely frustrated.
Sorry for the length, but I want to be clear.
I am using JBuilder 9 Personal
I am trying to divide my project into packages.
I want a ‘system?package with the line ‘package system;?in all of its .java files
This system class does not use any other packages I have created, just the normal JFC packages
I have several applications that I want in their own package each of which need to import and use the classes in the ‘system?package
I am unsure first, of how the directories should be set up, and next, of how to create the packages.
First the directories:
Should I have them set up like this?
C:\Projects\app1\src (imports ‘system?package)
C:\Projects\app2\src (imports ‘system?package)
Or like this?
C:\Projects\src\app1 (imports ‘system?package)
C:\Projects\src\app2 (imports ‘system?package)
Next I want to make packages and build
I’ve been trying to do this by creating new projects.
I create a system project and point all my paths
I have been able to get this to work by using either one of the above directory structures
The problems appear when I attempt to create the app1 or app2 project and try include the system package
If I choose the automatic resource package option, it gives me all kinds of packages and resources but does not have my ‘system?package. It also gives me packages I don’t want.
If I turn off automatic resource package option, I get no packages and choosing the ‘add files/packages/classes?option brings up a bunch of packages but my ‘system?package is not there.
I hope I'm missing something really simple and obvious.
Please help!

Re:Creating packages and projects with JBuilder 9 Personal

On 8/12/2003 at 12:50:54 AM, OIiver Brelsford wrote:
I have now tried making one project with my .java files in one src


When I turn on 'automatic resource packages'
it shows all of my directories as packages.

(the system package does not need app1 and app2 to run,
app1 and app2 only need the system package to run)
This is the correct directory structure, given the other decisions you
have made. The files in a package go under the source tree, in a
directory that corresponds to the package name.
If you do not want other packages to show up in your project, you
should probably put them in a different project with a separate source
tree. Trying to get JBuilder to ignore source files that are in the
project's source tree is not a good idea.
John McGrath [TeamB]