• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Mysterious ClassNotFoundExceptions

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never try with a JS but the slash in codebase don't look familiar to me
 
Jesus Banuelos
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try with this codebase:'bin'
 
This is my favorite show. And this is my favorite tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic