Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail From: emf Newsgroups: comp.lang.java.programmer Subject: Re: NoClassDefFoundError Date: Sun, 06 Jan 2013 19:19:45 -0500 Organization: Aioe.org NNTP Server Lines: 39 Message-ID: References: <50e24bb4$0$283$14726298@news.sunsite.dk> NNTP-Posting-Host: 97XtTwlsJbnnO+SkjYBVnA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:21082 On 2012-12-31 21:36 Arne Vajhøj wrote: > On 12/31/2012 9:24 PM, emf wrote: >> After a long time, I tried to create an applet. In eclipse it runs >> perfect as an applet, but in the webpage in the browser it gives a >> NoClassDefFoundError. >> >> I even tried my very first program, HelloWorldApplet, but I got again >> the same problem. >> >> What kind of problem is this? Is it a compilation issue? Or is it an >> eclipse problem? At this stage I would be happy to have the >> HelloWorldApplet run: I feel if I this runs, my other program will run >> too. > > Impossible to say without more info. > > It could be that the class/jar file is not correctly placed > or is not correctly served by the web server. > > Arne Thanks everybody for your replies and sorry for not having been more specific. I really did not expect to generate such a long thread, this is really a lively newsgroup! The problem was that eclipse (that's how it is capitalized it in the program's logo) insists on putting all classes into packages. When putting an applet in a webpage, the class has to be *in a folder with the same name* as it originally was in eclipse, and the webpage has to *call it from outside the folder*. I considered installing the SDK and compiling the applet without the package line on top, because I prefer to have the html and the applet in the same folder, but that has its own problems, so at this point since the program at last is working in my browser from an html file I count my blessings. Eustace -- Date Calculator with all-purpose JS code https://files.nyu.edu/emf202/public/js/dateCalculator.html