package problem, but why?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sid_northfield
Posted On:   Wednesday, September 18, 2002 12:49 PM

Why am I getting these errors, clearly the files are clearly packaged and the import is legal???? C:unzippedftpbean2>javac FtpExample.java FtpExample.java:1: package ftp does not exist import ftp.*; ^ FtpExample.java:17: cannot resolve symbol symbol : class FtpObserver location: class FtpExample class FtpExample implements FtpObserver ^ FtpExample.java:19: cannot resolve symbol symbol : class FtpBean location: class FtpExample FtpBean ftp; ^ FtpExample.java:25: cannot resolve symbol symbol : class FtpBean location: class FtpExample    More>>

Why am I getting these errors, clearly the files are clearly packaged and the
import is legal????


C:unzippedftpbean2>javac FtpExample.java

FtpExample.java:1: package ftp does not exist

import ftp.*;

^

FtpExample.java:17: cannot resolve symbol

symbol : class FtpObserver

location: class FtpExample

class FtpExample implements FtpObserver

^

FtpExample.java:19: cannot resolve symbol

symbol : class FtpBean

location: class FtpExample

FtpBean ftp;

^

FtpExample.java:25: cannot resolve symbol

symbol : class FtpBean

location: class FtpExample

ftp = new FtpBean();

^

FtpExample.java:55: cannot resolve symbol

symbol : class FtpListResult

location: class FtpExample

FtpListResult ftplrs = null;

^

FtpExample.java:72: cannot resolve symbol

symbol : variable FtpListResult

location: class FtpExample

if(type == FtpListResult.DIRECTORY)

^

FtpExample.java:74: cannot resolve symbol

symbol : variable FtpListResult

location: class FtpExample

else if(type == FtpListResult.FILE)

^

FtpExample.java:76: cannot resolve symbol

symbol : variable FtpListResult

location: class FtpExample

else if(type == FtpListResult.LINK)

^

FtpExample.java:78: cannot resolve symbol

symbol : variable FtpListResult

location: class FtpExample

else if(type == FtpListResult.OTHERS)

^

9 errors


C:unzippedftpbean2


within the above directory it has one file called FtpExample.java and folder
called "ftp" which has has 6 classes. On top of each .java class
inside the folder "ftp" it has this statement


package ftp;



public class someThing{


//rest of code


}


//here is the class FtpExample


import ftp.*;


/


class FtpExample implements FtpObserver


{


 ...


...


....


}


//public static void main(String[] args)


{


FtpExample example = new FtpExample();


example.connect();


example.listDirectory();


example.getFile();


example.close();


}


}



 

   <<Less

Re: package problem, but why?

Posted By:   Luis_Untama  
Posted On:   Thursday, September 19, 2002 10:18 AM

Do javac -classpath . FtpExample.java


The classes under folder ftp are already compiled (.class files), right?
About | Sitemap | Contact