 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lou Fox Guest
|
Posted: Thu Dec 11, 2003 1:51 am Post subject: Please help! Applet can't find classes that are in a jar fil |
|
|
I wrote an applet that doesn't have a display, it is just used for
returning values to javascript variables. I turned it into an applet
jar file using the wizard in jBuilder X, and it works fine from within
in jBuilder, but once it's outside of jBuilder I get the following error:
java.lang.NoClassDefFoundError: com/bluewolf/sfdc/SFFactory
at sampleproject.SampleApplet.setup(SampleApplet.java:70)
I can see the missing class file right inside of the jar when I extract
the contents of the jar through the command line, or by displaying the
contents in the jbuilder project view.
Here's the html code for the applet:
<applet
code = "sampleproject.SampleApplet.class"
archive = "SampleProject.jar"
name = "TestApplet"
codebase = "./"
| Quote: |
param name = "param0" value = "baseball" |
</applet>
What am I messing up? I bet it has to do with classpath, but the html
file is in the same directory as the SampleProject.jar, so I shouldn't
even need the codebase attribute, right?
Here's another clue, the SFFactory class is in another project that I
included in this project through the "Project Properties/Paths/Required
Libraries" dialog box.
I thought it might have been the manifest.mf file so I added the
following line to it:
Class-Path: .
But that didn't help either.
I even tried to extract all the contents of the jar file, and let them
sit in the proper directory structure inside of the same directory as
the html file. I removed the archive attribute from the applet tag
tried that and still got the same error.
Please tell me what I'm messing up.
|
|
| Back to top |
|
 |
pNichols Guest
|
Posted: Thu Dec 11, 2003 10:32 pm Post subject: Re: Please help! Applet can't find classes that are in a jar |
|
|
Lou Fox wrote:
| Quote: | I wrote an applet that doesn't have a display, it is just used for
returning values to javascript variables. I turned it into an applet
jar file using the wizard in jBuilder X, and it works fine from within
in jBuilder, but once it's outside of jBuilder I get the following error:
java.lang.NoClassDefFoundError: com/bluewolf/sfdc/SFFactory
this line is telling you where the problem lies. Are these classes/libraries |
added to your distributed jar file?
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|