Article View: borland.public.jbuilder.java.language
Article #7315Re: Building Packages
From: Rich Wilkman
Date: Tue, 26 Jun 2001 16:29
Date: Tue, 26 Jun 2001 16:29
38 lines
2391 bytes
2391 bytes
File | New... <Application> Number 1 and 2 are joined at the hip. When you create a class using File | New Class, you specify the package name for that class. If you create the class first and then want to move it to a different namespace (package), there are tools in Pro and Ent that do it for you, or you can simply copy and paste the source to the new location, update the package statement and recompile. Number 3 involves getting the class file onto your classpath and that is done by making a library for those classes and adding the library to the project that needs them. After that it's just your normal import process. Where the class lives (you really shouldn't put it in /jre/classes as you aren't Sun and that is generally reserved for their namespace) isn't important as long as it can be found. When you run from the IDE, you see the command line and its classpath in the message view. That should tell you the locations, etc. you need for referencing your classes. What is the difficulty you are having, though. Your post is a tad generic. -Rich Bob Palank wrote: > > Could someone send a trivial example that: > 1. Uses JB4 to build a class file > 2. Store that class file in a newly created package. > 3. Write and build an application that uses the packages class file. > 4. The client (read application should live on A: > 5. The .class file being called by the client should live in > ......\jre\classes > > I can't seem to do this within JB4 - why, I don't know. > TIA > Bob Palank
Technical Details
Message-ID:
<3B38B87A.3DA5651A@formlessvoid.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3b388dfc$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7f14d179e1d5a4fe X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-26 09:31:19 PST Message-ID: <3B38B87A.3DA5651A@formlessvoid.com> Date: Tue, 26 Jun 2001 09:29:46 -0700 From: Rich Wilkman <richw@formlessvoid.com> X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Re: Building Packages References: <3b388dfc$1_1@dnews> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 208.236.69.60 X-Trace: dnews 993572987 208.236.69.60 (26 Jun 2001 09:29:47 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews