🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16049

Re: NoClassDefFoundError

#16049
From: krcroft
Date: Fri, 09 Apr 1999 00:00
126 lines
4599 bytes

Jason,


I'm also getting the same "NoClassDefFoundError" when I run my applet in
netscape 4.51 - and here's what I'm doing step by step:

Open JBuilder2
click "file" -> "new" -> "Applet"
then click "Finish" (with all the default name and directory settings)
then i click "Wizards" -> Deployment Wizard
I leave all the default settings except for "No Archive", which i check on.
Then I deploy it to a directory.

(I called my files "Test")
the Test.html file, and the Test.class are now deployed in the same directory.


Here's the APPLET Section of the HTML file:

  CODEBASE = "."
  CODE     = "Test.class"
  NAME     = "TestApplet"
  WIDTH    = 400
  HEIGHT   = 300
  HSPACE   = 0
  VSPACE   = 0
  ALIGN    = middle

shouldn't be any problem with any crazy class path's, or directory structure,
nor any problems with any properietary borland classes either - after all, the
applet does nothing, and the code hasn't been touched!

Now I open netscape 4.51, type "c:\" in the url location window, and surf to
my Test.html file - it then says "Loading java" for a couple seconds - then
the dreaded:

Applet Test error:java.lang.NoClassDefFoundError: Test

At this point, I begin squeezing my fists until the capilaries lining the
flesh inside my hands burst, and blood drips from the inside of my fist like
I crushing oranges.

After wrapping my hands in bandages, I then hit the web and the newsgroups
looking for a solution to this problem:  what do i find?

a ton of useless posts about how I have to modify my directory structure,
include a ton of JAR files, change the codebase  and classpath parameters
etc.. etc..

This is rediculous!  I'm using a friggin 'Deployment Wizard' that dynamically
alters the html and class files so they should work wherever I deploy them!

Everything works perfect from within builder2!  JAVA HAS BECOME A NIGHTMARE.

When I compile an EXE file In C++ Builder 3 all the dependant
classes/headers/sources are built into it - it can run in its own.. but in
java, it seams like my .class file is hopeless without a mess of 3mb - 4mb
borland .JAR libraries.

kevin





> I don't seem to be having any luck.
>
> Does this sound correct:
> I create a Hello world app.
> Deploy it with the DeployWizzard; it also makes the html w/ the tag. And
> puts all the stuff in: c:\Program
> Files\borland\JBuilder2\myclasses\hello3 (this is where the .JAR and
> .CLASS files are), the html file is one level out of this in
> ..\myclasses
>
> It compies w/ no errors, after all it is just one label that I changed
> the text and BG collor on.
>
> The HTML tag looks like just like what you wrote. I have changed the
> CODEBASE to just about everything under the sun:
> ..\hello3
> ../hello3
> d:\bla bla bla....\hello3
> .
> ""
> And I get 3 different errors depending on it: can not creat: NEW() {or
> some thing like this}, that one about the NoClassDefFoundError, and one
> just says can not load applet {or something like that}.  Do I need to
> add the ARCHIVE = "hello3.jar"? I think if I add the ARCHIVE = I then
> get the "can not create: NEW()" And I do deploy as a compressed file
> .JAR.   I don't think this should be this complicated; I must be missing
> something simple.
>
> <APPLET
>   CODEBASE = "."
>   CODE     = "hello3.Hello3.class"
>
>   NAME     = "TestApplet - Hello3"
>   WIDTH    = 400
>   HEIGHT   = 300
>   HSPACE   = 0
>   VSPACE   = 0
>   ALIGN    = middle
> >
> <PARAM NAME = "h_tmp" VALUE = "Nothing">
> </APPLET>
>
> Thanks,
>     j
>
> --
>
> �,+���+,��,+���+,�*
> ....Jason C. Leach
> ..."Many Hands Make Light Work."
> ..- Unknown
>
> -- PGP key on server: pgpkeys.mit.edu
>
>


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <7elj1b$7s$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36FC8887.E850C85@hotmail.com> <7dj39k$2tk7@forums.borland.com> <36FD4EA4.9874D40B@hotmail.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,d1c999c3c160fcf4
X-Google-Attributes: gidf74b3,public
From: krcroft@my-dejanews.com
Subject: Re: NoClassDefFoundError
Date: 1999/04/09
Message-ID: <7elj1b$7s$1@nnrp1.dejanews.com>
X-Deja-AN: 464514711
References: <36FC8887.E850C85@hotmail.com> <7dj39k$2tk7@forums.borland.com> <36FD4EA4.9874D40B@hotmail.com>
X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 24.64.38.95
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Fri Apr 09 18:38:07 1999 GMT
Newsgroups: borland.public.jbuilder.java.language
X-Http-User-Agent: Mozilla/4.51 [en] (Win95; U)