BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Please help! Applet can't find classes that are in a jar fil

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues
View previous topic :: View next topic  
Author Message
Lou Fox
Guest





PostPosted: Thu Dec 11, 2003 1:51 am    Post subject: Please help! Applet can't find classes that are in a jar fil Reply with 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

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





PostPosted: Thu Dec 11, 2003 10:32 pm    Post subject: Re: Please help! Applet can't find classes that are in a jar Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.