🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #311

Re: New to JBuilder

#311
From: Paul Furbacher [TeamB]
Date: Thu, 06 Oct 2005 00:59
74 lines
4118 bytes
AA wrote:

> I have some .jar files that contain classes I need to use.  As
> Sun's website said to do, I copied the .jar files to the
> jre\lib\ext directory.  JBuilder still won't recognize they're 
> even there.  NetBeans finds them and I can import them, but I'm
> using JBuilder because NetBeans is having a problem making a web
> service.  I've also tried Project|Add files but that won't work
> either.
> 
> Any suggestions? [...] I don't know what's wrong.

You're not going to like hearing this, but not reading the manual
is what's wrong.  Anyway, it's easy to overlook when you are
eager to dive right in.  See "Configuring and Adding Libraries"
in the Help > Help Topics.

The advice which Sun gives is rather twisted since you
really don't want to pollute the JRE's installed lib
directory with your app-specific JARs.  It's convenient,
but wrong.  So is the habit of Netbeans to find those JARs in
that manner.

Lest you think that Eclipse would be easier, you have to
add the JARs either as libraries and piecemeal to your
project.  (I've never tested the above approach in Eclipse,
but if it allows it, it deserves three good whacks across
the fanny for it.)

The JARs in question are usually relevant only to a specific
project, not to the JRE itself.  For instance, say you have
two projects, one a "legacy" project which depends on earlier
versions of say the servlet API.  The other is a JSF app, and
as such, needs to use the most recent version of the servlet API.
It is kind of difficult to have two servlet.jar files in
that JRE lib folder.  Hence, you normally keep project or
app-specific JARs in discreet locations.  For JBuilder
projects, you define libraries and add them to your
project.  For deployment, you place the dependent JARs
in a lib folder in the directory structure of your deployed
app, and include those JARs in the -classpath command-line
option.  (Some reading on the fundamentals of Java are in
order to get up to speed with command-lines, etc.  These details
are outside the domain of an IDE which tries to smooth over all
those nitty-gritty details.)

> Note that JBuilder isn't recognizing javax.servlet either.  

Have you created a Web module in your project.  If not,
do so (unless you are using Foundation, which doesn't assist
you in making Web apps).  Once you make a Web module, JBuilder
adds the correct version of the servlet.jar to your "required
libraries" (read manual for description).

In the case of Foundation, you'll have to get a distribution
of Tomcat or some other Web app container, which will have the
servlet.jar bundled with it.  Make a library for that JAR
and add it to your project.


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://info.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Technical Details
Message-ID: <43447656$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43445c6e$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,d1a566cbdebf79b0
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 05 Oct 2005 20:59:08 -0400
From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com>
Organization: Reverse Alchemy, Inc.
User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: New to JBuilder
References: <43445c6e$1@newsgroups.borland.com>
In-Reply-To: <43445c6e$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.142.194.228
Message-ID: <43447656$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1128560214 69.142.194.228 (5 Oct 2005 17:56:54 -0700)
Lines: 74
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail