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: Thu, 12 Apr 2012 07:38:20 +0530 Organization: Aioe.org NNTP Server Lines: 17 Message-ID: References: <5669729.293.1334143190239.JavaMail.geo-discussion-forums@pbtr10> NNTP-Posting-Host: sjv/uRfCF/1Pjp3r2LpCJg.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:13489 On 04/11/2012 06:14 PM, Paul Cager wrote: > On Apr 11, 12:19 pm, deepak wrote: >> I tried . also and I got the result as shown below. >> D:\project>java . SendMailTLSDFC >> Exception in thread "main" java.lang.NoClassDefFoundError: / > > You need > > java -cp . SendMailTLSDFC > > Otherwise the java command assumes "." is the name of the class you > are trying to run. To the OP: You'll need mail.jar on the classpath too, so the command will be: java -cp D:\mail.jar;. SendMailTLSDFC