Hi. This is probably something really little and stupid that I'm missing, but I can't figure it out! I have created a folder in windows explorer that is named com/storekraft/lib. There are other folders besides lib in this path that I am using and importing into my java apps that are working. However, when I try to import com.storekraft.lib.*; it keeps telling me the package does not exist! I have this in my classpath, is there something else I am forgetting? The only thing in the "lib" folder is a JDBC driver file. That shouldn't matter should it? Thanks for any help!
What do you have in your classpath? Is it com/storekraft/lib (wrong) or the directory that com/storekraft/lib is in (right)? Is the driver file you have there a compiled class file (right), or a Java source file (wrong)? Have you made any spelling errors anywhere? (Oh, that would be wrong too. ) You're right though, even if a package just contains a single class, you can import it with: import com.storekraft.lib.*;
Joined: Mar 08, 2001
And also what is the actual package name of the JDBC driver.. if it is org.xxx.yyy.jdbc then you may have to place it in an appropriate directory.
<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
Joined: Feb 28, 2001
In my classpath, I have "I:/VSK Java Programs/com/storekraft/lib;". In the "lib" folder, I have a jar file (jt400.jar). I guess I'm confused because before in my classpath all I had was "I:/VSK Java Programs;" and that is working for the folders that were in there before. What is different now? Thanks again for your help!
Joined: Dec 10, 2001
Import statements are for importing classes, not packages. To import somepackage.* is to import every class found in that package. You cannot import a package that doesn't have any class files in it (so to speak). You said you have a jar file in a folder. You cannot import the location of a jar file. You would want to specify the location of the jar file in the classpath setting. Making sense?
Gotcha Dirk! I told ya it was probably something stupid! I'll make sure and write that one down so I remember next time!!! THANK YOU!!!
Joined: Feb 05, 2003
any hints or useful websites on how to create a jtree node from info entered in a dilaog box containing a textfield for the user to enter text into. Say, that node would be called wahtevers entered in textfield after user clicks ok