I have created a simple java file on desktop..When I am trying to execute it using cmd(with all variables set) then it is getting compiled but during the time of "java Filename" shows "main not found".This file is getting executed in eclipse and netbeans..What could be the reason for this???

Please post whole error and also execution command yo using

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.