aspose file tools*
The moose likes Applets and the fly likes applet can not find needed classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "applet can not find needed classes" Watch "applet can not find needed classes" New topic
Author

applet can not find needed classes

mohsen fakhary
Greenhorn

Joined: Aug 16, 2011
Posts: 6
Hello
I have a HTML page with an applet inside it.
I have the applet class and all other needed classes in a jar file in jre/lib/ext folder (I'm on windows). But when I open the HTML file in a browser it gives me ClassNotFound exception

The HTML file is this:



I have this HostOnDemand class in its package in a jar file in jre/lib/ext but it can't be found.
Since the applet is way too old, I'm using jre1.4.2 and netscape.

Please let me know if I should provide any other details.

Any idea may help
Thank you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Is there any particular reason not to keep the code on the web server along with the HTML file, and reference it via an archive attribute.

Since the applet is way too old, I'm using jre1.4.2 and netscape.

Not sure what you mean by the applet being old, but Java is mostly backwards-compatible - so in general code will run on newer JVMs. Both the Netscape browser and Java 1.4 have not been maintained for many years - using either is an invitation for attackers to take over your machine.


Ping & DNS - my free Android networking tools app
mohsen fakhary
Greenhorn

Joined: Aug 16, 2011
Posts: 6
Thank you
In fact I've no control on the HTML file. I'm just trying to run the applet. It's an old web-page (it was developed a long time ago) which was/is used using MS-JVM and IE7. And now I have to run it anyway. And as you know installation of IE7 on a win7 is neither easy nor advisable. I want to use netscape just for the purpose of running this applet.
Running the applet using jre1.7 gave me some errors about security model. After searching on the error I noticed I should use older jres.

Thank you

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Well, you should at least use the latest Java 6 instead of Java 1.4, alongside a current browser.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet can not find needed classes