I want to run one Java file from a project in Eclipse. There is code to insert into database in that Java file, I want to check from that single file whether its working or
Sure, you just need a main function for any independent file.
Create a class like so:
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }
and run that.