Help Please

Hi

I have just downloaded commons-dbcp-1.2.1 and have had trouble trying to integrate it into NetBeans so that my code will complie.

I have tried several things to try and make this work firstly I placed the JAR file in to my java instalations lib folder, and then set the classpath environment variable to include this, this however did not work.

I then went into Netbeans and discoved under tools something called Library Manager, I created a new Library called DBCP and added links to the classpath sources and java docs, still it does not work.

Finally I searched around a bit more and tried doing the same using the Java Platform Manager under the Tools menu, still no luck

The error I am getting is as follows and occurs on the import statements

package org.apache.commons.dbcp does not exist

The following is the import statements I am using

import org.apache.commons.dbcp.ConnectionFactory;

import org.apache.commons.dbcp.DriverManagerConnectionFactory;

import org.apache.commons.dbcp.PoolableConnectionFactory;

import org.apache.commons.dbcp.PoolingDataSource;

I am using NetBeans 5.5 with Java jdk1.6.0

Anyone out there can tell me what I'm doing wrong, and how to fix this please?... oh and using . completion works while typing the code... just won't compile.

[1358 byte] By [Dream-Scourgea] at [2007-11-26 14:59:21]
# 1

Are you developing a web application? Usually web applications have a WEB-INF folder, under with there's a lib folder where you'll need to place all JAR files.

And you can use Ant script to perform a compile, instead of using the IDE to perform the compiling. But that's suitable for deploying web applications.

Basically whatever tool you are using to perform the compile does not see the JAR file. See where all other JAR files for your project are placed, and place this JAR file in the same location and try to compile.

appy77a at 2007-7-8 8:48:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks that should work... don't know why I didn't think of that... got stuck on trying to get NetBeans to see them.... which would be preferable as I plan to use this package for quite a few different projects.Good answer thanks.
Dream-Scourgea at 2007-7-8 8:48:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...