wood burning stoves 2.0*
The moose likes Applets and the fly likes Mysterious ClassNotFoundExceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Mysterious ClassNotFoundExceptions" Watch "Mysterious ClassNotFoundExceptions" New topic
Author

Mysterious ClassNotFoundExceptions

James Brill
Greenhorn

Joined: Nov 13, 2012
Posts: 1
Hello!

I'm relatively new to Java applets and have just recently been experimenting with them. I'm building a simple applet in Eclipse and I keep having trouble accessing it in browsers; it works fine in Eclipse itself. The error I get in Chrome, Opera, Firefox and IE is "Error. Click for Details." -> Details -> "... load: class doodle.DoodleApplet.class not found. java.lang.ClassNotFoundException: doodle.DoodleApplet.class ..."

Something definitely isn't right. After an hour of having this problem and trying out different things, my applet suddenly starts working properly for no apparent reason. I then make some changes to the applet in Eclipse, save it and the changes are not reflected in the browser (the page was refreshed). I tried reloading Chrome and suddenly, the ClassNotFound problem returns. I've been going through this cycle for some hours now. I can't put my finger on what's affecting my ability to view the applet in browsers; sometimes the situation changes without me even making any changes to the code. So to summarise:

1. ClassNotFoundException occurs most of the time when trying to view applet in browsers.
2. Something (though I don't know what) occasionally stopped this error and allowed the applet to be viewed.
3. Reloading the browser appeared to re-introduce the ClassNotFoundExceptions.
4. On the few occasions when I could view the applet, changing its contents in Eclipse did not affect its contents in the browser even after deleting the browser tab and opening a new one.

I'm pretty sure I've embedded the applet correctly. My HTML file is in the project folder and the class file is inside a package within the bin folder at the next level down.

Locations are as follows:

HTML file: C:\...\doodles\TheFirstDoodle
Class file: C:\...\doodles\TheFirstDoodle\bin\doodle

I've used deployJava.js like so:



I feel certain the class should be accessible; I can't figure out what's causing the error.

Any ideas would be much appreciated!
Thanks!

James Brill

Jesus Banuelos
Greenhorn

Joined: Jan 08, 2013
Posts: 2
I never try with a JS but the slash in codebase don't look familiar to me
Jesus Banuelos
Greenhorn

Joined: Jan 08, 2013
Posts: 2
try with this codebase:'bin'
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Mysterious ClassNotFoundExceptions