Article View: borland.public.jbuilder.java.api
Article #2400Re: Newby Question
From: Joi Ellis
Date: Tue, 24 Oct 2000 00:00
Date: Tue, 24 Oct 2000 00:00
39 lines
2430 bytes
2430 bytes
James A. Schulz <jaschulz@wiseware.com> wrote:
> Joi,
> Yes, it looks like this:
> package com.davidflanagan.examples.i18n;
> I don't understand the function of this statement. It looks like a path to
> me. Can I change it to point to my src folder?
That's is the package namespace setting. Java expects the
file's own path to reflect the package statement. So, typically,
one would place the source file so:
jbproject/ThisExample/src/com/davidflanagan/examples/i18n/ThisExample.java
The JBuilder sourcepath setting must not change, it should still point
at "jbproject/ThisExample/src", since that is the top of the source tree
and the package name space.
In this particular case you may be able to simply delete the package
statement and leave the file where it sits. However, this is NOT a good
general strategy for importing 3rd party applications. Whacking
package statements can cause all sorts of namespace access issues.
By deleting the package statement, you're telling Java that all variables
in the java file belong to the "default" or "null" package. The default
package is the very top of the source and class paths, ie "src" and "classes".
See http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
for Sun's tutorial on packages.
--
Joi Ellis Software Engineer
Aravox Technologies joi@aravox.com, gyles19@visi.com
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
Technical Details
Message-ID:
<8t4ar6$j2611@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@bornews.borland.com> <8t26tt$2gi1@bornews.borland.com> <8t2ur5$8k61@bornews.borland.com> <8t3047$8n45@bornews.borland.com> <8t468c$j808@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,66c65841f86ddcb1
X-Google-Attributes: gid1089d0,public
From: Joi Ellis <joi@joi.aravox.com>
Subject: Re: Newby Question
Date: 2000/10/24
Message-ID: <8t4ar6$j2611@bornews.borland.com>
X-Deja-AN: 685284331
References: <8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@bornews.borland.com> <8t26tt$2gi1@bornews.borland.com> <8t2ur5$8k61@bornews.borland.com> <8t3047$8n45@bornews.borland.com> <8t468c$j808@bornews.borland.com>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.api