Now i have compiled new package,but in other java programs i can not import this package,although i set the enviroment variable "classpath" to that the path of new pachage.I do all these under Windows 2000 Server.If the path of the package is C:\package1, and I add this to enviroment variable classpath ,but it is in vain.Who can tell me how to do next?Thanks in advance.
I suspect that you are on the right path. What is the exact structure of your package and relevant disk drive(s) including the full name of the package? What exactly does your classpath setting look like?
I'm not familiar with configuring 2K server, but on 2K Pro, there are two sets of environmental variables: system and user. Be sure you set the Classpath in the user if you are not executing from a system context. Hope this helps, Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Joined: Jan 15, 2002
Hi,Dirk and Michael,the full name of the package is "oracle.jdbc.driver",all class files of this package are under this path "c:\oracle\ora8i\jdbc", so I set the system and user enviroment variable both to this path(thank you for reminding me this point,Mickael,I indeed set it ).And I am sure that I declared the package name in the source file.
You should set the CLASSPATH environment variable to the directory/subdirectory where the package is rather than the subdirectory where the classes are. In this case, your package is oracle.jdbc.driver in the C:\ directory. You should have C:\ in your CLASSPATH.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Dec 10, 2001
the full name of the package is "oracle.jdbc.driver",all class files of this package are under this path "c:\oracle\ora8i\jdbc" You have a problem here. Your package name/structure doesn't match your folder name/structure. These need to be the same.
Joined: Jan 15, 2002
Thank you,all, I have import the package i want by setting the enviroment variable correctly(yes,the hierarchy of pachage should be same to the path hierarchy),I really appreciate your help.