Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jar File library not finding path!

Status
Not open for further replies.

FOR111

Programmer
Sep 29, 2005
103
MT
Hi All,

I have an applet project in Eclipse which uses several libraries (both as Jar, which i just got to know that this shouldn't happen, and packages). The applet works great until recently i wanted to add another Jar library (org.jdesktop.jdic.browser.WebBrowser). This i added to the build path of the project as a jar file within the library.

Once i added the new library i could work within the IDE, compile the project and run it. Though once i run the application i get this error:

Code:
java.lang.NoClassDefFoundError: org/jdesktop/jdic/browser/WebBrowser

The jar library files all seem to show up within the main jar file. So i can't understand why the applet is always looking for the whole path (ie: org/jdesk....). Infact if i open the jdic jar file within the root it works!

Any help with this would be greatly appreciated!


Nick
 
i'm creating a jar file ... then running it within tomcat on IE 6!

Thanks
 
Ok, it's an applet, so it doesn't work in Tomcat, but in the browser. How are you declaring it? What's in the jar? Are you including the classpath in the jar? Are you using the archive option to include jars? Did you try appletviewer?

The more information you provide, the more we can help you. If you don't give details, it's impossible.

Cheers,
Dian
 
I'm sorry Dian for the lack of info..you're quite right..though since i'm quite a beginner in java i'm not always able to supply the required info as could using either C++ or .NEt....but then again.

It seems that i solved the issue by supplying the package within the build folder of the application and adding the Jar file within the library..also i excluded the build path of the package so that it doesn't delete it on compile!

Thanks for your help...

Nick
 
Well, I don't fully understand what's going on, but glad to know it's working. Let's follow the golden rule of sofware engineering: "If it works, don't touch it!"

Cheers,
Dian
 
HEHE...i like it..but i usually don;t trust that saying!! but then again yes..in this case it works so i'll let it be!

Dian..might i ask you another question...

I need to implement an IE component within the applet. Reason being that i need to sign a license whilst downloading a file...and this license can only be created by your most humble micrsoft's activex control!

So first i used the AppletContext to showDocument and run the URL..but that opened a new blank IE and my manager didn't like it ...so now i have to remove it! What i was thinking of was to implement a IE control (hidden) within the applet and run the browser from there..hopefully the activex will be launched!

I have two problems:

1. I tried jdic library though it does not work on MacOS
2. i need soemthing that is indescrete.

I read on your previous posts that you did something similar using com..but i didn't get a hint on how this was achieved.

Any help would be really .. but really appreciated!

Tahnks once again
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top