Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Applet notinitited, please need urgent help

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I face a porblem loading applets into html page. I have been working on this issue for 5 days now and couldn't figure out the solution. All the google links guide me to this amazing forum. However, I didn't solve the problem yet. I hope that I end up with this issue here.

When I load the applet in the browser with apache tomcat v5.5 running on local host, i get this error:

Java Plug-in 1.5.0_16
Using JRE version 1.5.0_16 Java HotSpot(TM) Client VM
User home directory = /home/mouza


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class EchoApplet.class not found.
java.lang.ClassNotFoundException: EchoApplet.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:179)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:613)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:723)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1813)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:652)
at sun.applet.AppletPanel.run(AppletPanel.java:326)
at java.lang.Thread.run(Thread.java:595)

--------------------------------------------------------------


I'm using Eclipse and sun java version 6.

The index file is as follow:



The EchoApplet class is as follow:



Please, can anyone help me solving this problem asap?
[ October 29, 2008: Message edited by: Mouza Ali ]
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using an absolute path for "codebase" doesn't work; it needs to be relative. The easiest would be to put the class files into the same directory as the HTML file. Then you don't need the codebase attribute at all.
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
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