ClassNotFound error
Hi All,
I am executing this code
logCat.debug("before getting the channel");
FileChannel fCh=new RandomAccessFile(lockFile,"rw").getChannel();
logCat.debug("before trying the lock");
but second line after the first debug statement is giving me java.lang.noSuchMethoderror error.
the first debug statement is being printed
i am using j2sdk 1.4.2_09 in my server.
please help
Hi,
The code you have pasted.. is working fine with me.. with jdk1.4
I tried running this program for a test.
/***************************************************************/
import java.io.*;
import java.nio.channels.*;
public class RandomTest
{
public static void main(String[] args) throws Exception
{
File lockFile = new File("Test.java");
System.out.println("Before");
FileChannel fCh= new RandomAccessFile(lockFile, "rw").getChannel();
System.out.println("After");
}
}
/***************************************************************/
Try compiling this code and run.
It is perfectly working with me.