Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.7k views
in Java FTP by (120 points)
Hey guys, im getting an error in the code im playing with:

TestProgressMonitor monitor = new TestProgressMonitor();
ftp.setProgressMonitor(monitor, 2048);

/* ... */

class TestProgressMonitor implements FTPProgressMonitor {
/* (non-Javadoc)
* @see com.enterprisedt.net.ftp.FTPProgressMonitor#bytesTransferred(long)*/
public void bytesTransferred(long count) {
System.out.println(count + " bytes transferred"); }
}

and now im getting the following error:
non-static variable this cannot be referenced from a static context

so, i really have no idea what that means.. just letting u know, that im using java1.4.2 and my IDE is JCreator light..

if anybody has some help for me, please let me know..

2 Answers

0 votes
by (162k points)
Is this a compile error? Can you isolate it to say 10 lines of your code and then post those lines on the forums for us to take a look at?

Hey guys, im getting an error in the code im playing with:

TestProgressMonitor monitor = new TestProgressMonitor();
ftp.setProgressMonitor(monitor, 2048);

/* ... */

class TestProgressMonitor implements FTPProgressMonitor {
/* (non-Javadoc)
* @see com.enterprisedt.net.ftp.FTPProgressMonitor#bytesTransferred(long)*/
public void bytesTransferred(long count) {
System.out.println(count + " bytes transferred"); }
}

and now im getting the following error:
non-static variable this cannot be referenced from a static context

so, i really have no idea what that means.. just letting u know, that im using java1.4.2 and my IDE is JCreator light..

if anybody has some help for me, please let me know..
0 votes
by
ok no need help anymore.. i found the errror.. thanks!

Categories

...