Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: GGolf Newsgroups: comp.lang.java.programmer Subject: Re: Exception in thread "main" java.lang.NoClassDefFoundError: SendMailTLSDFC Date: Tue, 10 Apr 2012 18:56:50 +0530 Organization: Aioe.org NNTP Server Lines: 16 Message-ID: References: NNTP-Posting-Host: YFEgcufeKda31fohh2gZiw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110419 Thunderbird/3.1.9 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:13465 On 04/10/2012 02:10 PM, deepak wrote: > Hi, I have created a java file for sending a file to my mail. I am > using mail.jar file. I am able to create .class file properly. But am > unable to run this file using java command on command prompt. > javac -cp D:\mail.jar SendMailTLSDFC.java > above command is working properly. > It creates 2 class as mentioned below > SendMailTLSDFC$1.class > SendMailTLSDFC.class > > but when i am trying to run following command I am getting an error. > java -cp D:\mail.jar SendMailTLSDFC > Exception in thread "main" java.lang.NoClassDefFoundError: > SendMailTLSDFC Did you try adding the current folder (.) to the classpath?