Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > NoClassDefFoundError

Reply
Thread Tools

NoClassDefFoundError

 
 
emf
Guest
Posts: n/a
 
      01-01-2013
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.

emf

--
It ain't THAT, babe! - A radical reinterpretation
https://files.nyu.edu/emf202/public/...intmebabe.html
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      01-01-2013
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


 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      01-01-2013
Arne Vajhj wrote:
> emf wrote:
>> After a long time, I tried to create an applet. In eclipse [sic] it runs
>> perfect as an applet, but in the webpage in the browser it gives a
>> NoClassDefFoundError.


Hmm. Could there be a dependent JAR missing in the browser context?

>> I even tried my very first program, HelloWorldApplet, but I got again


Example, please?
http://sscce.org/

>> the same problem.


Which would be ...?

Yes, yes, you said 'NoClassDefFoundError'. What was the *exact* message?

What is the code?

>> What kind of problem is this?


http://docs.oracle.com/javase/7/docs...oundError.html

You did read this before, yes?

It explains exactly what kind of problem this is.

RTFM is sooo useful.

>> Is it a compilation issue?


Really? Come on.

>> Or is it an eclipse [sic] problem?


Given that it doesn't happen in Eclipse, according to your report, I'd haveto
guess no.

>> At this stage I would be happy to have the HelloWorldApplet run: I feel if I this runs, my other program will run too.


"Feel"? Logic should rule.

> Impossible to say without more info.


Quite.

Although it's certainly possible to say this isn't a compilation error,


given that it happened at runtime


and not during compilation.


> It could be that the class/jar file is not correctly placed
> or is not correctly served by the web server.


Or not referenced properly in the various tags and applet JAR.

How are you packaging the applet?

How are you specifying its classpath?

--
Lew
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      01-01-2013
lipska the kat wrote:
> You really are an objectionable little oike aren't you.


Yes, I'm afraid I am.

> Is there really any reason to be so rude ?


Well, now, let's wonder at who's being rude. This person jumps
in to a discussion group to ask a question, ostensibly because
they need help, but they ask a question that's answered by the
most elementary initial step in analysis. This means they haven't
even takent the most elementary initial step in analysis.

That's looking up the error and reading its description, in case
you don't know.

Now failing to quote the error and provide code, that's fine, it's
a rookie mistake and no one holds it against the newbie. You point
them to http://sscce.org/ and request the missing data and everyone
progresses.

But it's rude to come to a bunch of folks, especially if you think
they are experts and presumably therefore worthy of respect, and just
expect them to drop everything and spoon-feed you answers you aren't
even going to understand anyway. It's beyond rude, it's presumptuous.

People here are inclined to help, voluntarily, for a variety of reasons.

Yes, even this objectionable little oike is helping. Everything I've said
is true and useful. Including the attitude. Go help yourself before you
waste people's time with trivial questions you should have already
answered yourself.

But perhaps you yourself are not of such advanced skill to find such
behavioral failure an imposition.

--
Lew
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      01-01-2013
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.


emf, in case I actually did hurt your feelings as "lipska the cat" and
perhaps others think I might, I apologize. It isn't about your feelings.
It's about the information and way you should proceed to succeed.

If you want to be a good programmer, you have to be able to figure things
out.

You will note that the link sends you right to the first piece of relevant
information about your problem, and the only one we can assist with given
the paucity of information you have provided.

The "you did read that before, yes?" is two things - a strong hint that
you should have already if you didn't, and an acknowledgment that it's
elementary advice if you did. Either way, it shouldn't hurt your feelings.
it's an objective question. You did read it before, yes? If not, you
should have, and should develop the RTFM habit. It's objective. If so, then
the question simply is to confirm the equally objective data.

Also, your questions asked for exactly the information given. If you need
different data, you need different questions. This was also indicated
in the two answers you got. We also asked for specific missing items.

If you examine the two answers, you will note a density of useful facts,
useful questions, and advice for how to deal with the problem.

You would be wise to follow up on the facts, answer our questions (here,
publicly), and heed the advice.

But not blindly. Just heed the good advice.

--
Lew
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-01-2013
On Mon, 31 Dec 2012 21:24:33 -0500, emf <(E-Mail Removed)> wrote,
quoted or indirectly quoted someone who said :

>NoClassDefFoundError


my condolences. It is bitch to track down since it can have so many
causes. See
http://mindprod.com/jgloss/runerrorm...SDEFFOUNDERROR
--
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish
as couch potatoes who hire others to go to the gym for them.
 
Reply With Quote
 
Magnus Warker
Guest
Posts: n/a
 
      01-02-2013
On 01/01/2013 10:35 AM, lipska the kat wrote:
> On 01/01/13 09:12, Lew wrote:
>> lipska the kat wrote:
>>> You really are an objectionable little oike aren't you.

>>
>> Yes, I'm afraid I am.
>>
>>> Is there really any reason to be so rude ?

>>

> [snip]
>>
>> But perhaps you yourself are not of such advanced skill to find such
>> behavioral failure an imposition.

>
> Ah yes, that must be it.


Forget it, he's a complete idiot.

I put him into my killfile some time ago, but then I removed him because
it's so funny reading his posts...

Magnus
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-02-2013
On Tue, 1 Jan 2013 01:12:01 -0800 (PST), Lew <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>Well, now, let's wonder at who's being rude.

Oh come on Lew. You are the rudest person I have ever encountered in
my life. Your purpose of existence is to put down others and
discourage them.
--
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish
as couch potatoes who hire others to go to the gym for them.
 
Reply With Quote
 
Arne Vajhj
Guest
Posts: n/a
 
      01-03-2013
On 1/2/2013 12:49 PM, Roedy Green wrote:
> On Tue, 1 Jan 2013 01:12:01 -0800 (PST), Lew <(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>
>> Well, now, let's wonder at who's being rude.

> Oh come on Lew. You are the rudest person I have ever encountered in
> my life.


That may be true.

But then I will conclude that you have not seen much.

> Your purpose of existence is to put down others and
> discourage them.


Are you reading his mind? Or just someone that has never
understood concepts like facts?

Arne

 
Reply With Quote
 
emf
Guest
Posts: n/a
 
      01-07-2013
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/...alculator.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory greg.knaddison@gmail.com Python 1 06-22-2004 10:58 PM
Need HELP with NoClassDefFoundError!!! keith Java 0 10-17-2003 01:18 AM
URLClassLoader plugin system.... getting java.lang.NoClassDefFoundError netpro2k Java 2 08-21-2003 03:12 PM
NoClassDefFoundError Monsieur Le Maire Java 2 07-21-2003 06:44 PM
Can't find class java.lang.NoClassDefFoundError. (Wrong class path?) qazmlp Java 6 07-11-2003 10:09 PM



Advertisments