edwbear1976a
asked on
package does not exists?
Hi , experts I downloaded some jarfiles for accessing as400 db2 database
and wheather I run it as a jsp or when I edit it using NetBeans as a servlet class it appears package does not exists,
"com.ibm.as400.access ", I just tried by using "import com.ibm.as400.access.*;" with same bad results
With the Net beans Ide I added the jar files as Libraries and when I check them out (the jt400 from inside) it shows up the full path completed
jt400.jar:
com
ibm
as400
access
as400JDBCDRIVER.class
but anyHoww when I want to compile it using net beans it shows class not found
(as400JDBCDRIVER.class) and if I import the com.ibm.as400.access.*; I get this error "package does not exists"
I downloaded the jars and I put them in a folder I just called IBMJTOPEN(just a name) where I unzipped them at
I added the jars path to my class path
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
%classpath%;C:\WINNT\java\ Packages;C :\jakarta- tomcat-5.0 .28\common \lib\servl et-api;C:\ jakarta-to mcat-5.0.2 8\common\l ib\jsp-api ;C:\IBMJTO PEN\lib\jt 400.jar;C: \IBMJTOPEN \lib\util4 00.jar;C:\ IBMJTOPEN\ lib\jt400S ervlet.jar ;C:\IBMJTO PEN\lib\ut il400.jar; C:\IBMJTOP EN\lib\jt4 00Servlet. jar;C:\IBM JTOPEN\lib \composer. jar;C:\IBM JTOPEN\lib \jt400micr o.jar;C:\I BMJTOPEN\l ib\jt400Pr oxy.jar;C: \IBMJTOPEN \lib\jt400 Servlet.ja r;C:\IBMJT OPEN\lib\j ui400.jar; C:\IBMJTOP EN\lib\out putwriters .jar;C:\IB MJTOPEN\li b\reportwr iter.jar;C :\IBMJTOPE N\lib\tes. jar;C:\IBM JTOPEN\lib \uitools.j ar;
-------------------------- ---------- ---------- ---------- ---------- ---------
The code I use is :
try {
DriverManager.registerDriv er(new com.ibm.as400.access.AS400 JDBCDriver ());
conn = DriverManager.getConnectio n("jdbc:as 400://" + system, username, password);
DatabaseMetaData dbMetaData = conn.getMetaData();
conn.close();
}
catch (SQLException e){System.out.println(e.ge tMessage() );e.printS tackTrace () ;}
catch (ClassNotFoundException e){System.out.println(e.ge tMessage() );e.printS tackTrace () ;}
return conn;
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- -------
Help!!!!
and wheather I run it as a jsp or when I edit it using NetBeans as a servlet class it appears package does not exists,
"com.ibm.as400.access ", I just tried by using "import com.ibm.as400.access.*;" with same bad results
With the Net beans Ide I added the jar files as Libraries and when I check them out (the jt400 from inside) it shows up the full path completed
jt400.jar:
com
ibm
as400
access
as400JDBCDRIVER.class
but anyHoww when I want to compile it using net beans it shows class not found
(as400JDBCDRIVER.class) and if I import the com.ibm.as400.access.*; I get this error "package does not exists"
I downloaded the jars and I put them in a folder I just called IBMJTOPEN(just a name) where I unzipped them at
I added the jars path to my class path
--------------------------
%classpath%;C:\WINNT\java\
--------------------------
The code I use is :
try {
DriverManager.registerDriv
conn = DriverManager.getConnectio
DatabaseMetaData dbMetaData = conn.getMetaData();
conn.close();
}
catch (SQLException e){System.out.println(e.ge
catch (ClassNotFoundException e){System.out.println(e.ge
return conn;
--------------------------
Help!!!!
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
:-)
;-D
ASKER
thank you all buds