Hi i am getting this error even after i have done import java.io.*;

Exception in thread "main" java.lang.NoClassDefFoundError: java/io/Console
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:127)

Does anyone have any solution to this problem

Instead of Java 1.4/5 which you are using, you need to use JDK 6 since Console is a class which was introduced in Java 6.

save your file in the bin folder

Don't put any of your code in the JDK's bin folder.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.