File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Importing packages - frustrated?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Importing packages - frustrated??" Watch "Importing packages - frustrated??" New topic

Importing packages - frustrated??

Narayana Swamy

Joined: Jul 03, 2000
Posts: 6
I am sort of frustrated with the import statement usage for user-defined classes in java. I have gone through the messages on this topics posted on this subject but I am still not clear. I want this thing to work seamlessly as it works for import* or*
I have created a directory called c:\test
Then created another two directories c:\test\client and c:\test\request
My classpath statement looks like this:
SET CLASSPATH = ./;c:\test;c:\jdk1.2.2\bin
My path statement looks like this:
SET PATH = c:\test;c:\jdk1.2.2\bin
I have a file called in c:\test\request which looks like this:
package request;
public class Logon {
I have a file called in c:\test\client which looks like this:
package client;
import request.*;
public class DataClient {
Logon a;
a = new Logon();
I successfully compiled and created the Logon.class file. Now, when I try to compile the DataClient file, I get an error saying that 'package request not found in import'. How do I correct this error? I don't want to do any quick and dirty fix-ups like copying the class files from one directory to the other or including the file in the javac command while compiling DataClient. DataClient must be able to compile by just saying 'javac' in the c:\test\client directory. Can anybody please help me?
Thanks in advance.

Narayana Swamy

Joined: Jul 03, 2000
Posts: 6
Sorry about my rant in the previous message. I actually got the thing working finally. I was making the stupid mistake of not running the autoexec.bat after every time I made a change to it. Just making a change and saving the autoexec.bat doesn't do a thing unless it is executed.
K.N. Swamy
I agree. Here's the link:
subject: Importing packages - frustrated??
jQuery in Action, 3rd edition