jQuery in Action, 2nd edition*
The moose likes Applets and the fly likes ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "ClassNotFoundException" Watch "ClassNotFoundException" New topic


Rajnishs Sinha

Joined: Jun 01, 2007
Posts: 5

i have an applet class named SimpleApplet.class
i also have supporting jar file named migcalendar.jar

these two files are present in my Application Servers folder in my box in the following folder


My Application server is

Jaguar CTS - Component Transaction Server/Version 5.2.0 (Build 52025)/P/PC Intel /Microsoft Windows/OPT/Nov 29 2004 16:40:29

I have included the applet class in a jsp named SimpleApplet.jsp

the jsp is also in my applicattion servers folder in my box in the following location


Below is the jsp file content

<jsp lugin
align="center" width="640" height="400"
iepluginurl="http://java.sun.com/j2se/1.4.2/download.html" >
<p>Unable to start plugin.</p>
</jsp lugin>

below is the error message in the Java Console

Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\rajnishs
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 SimpleApplet not found.
java.lang.ClassNotFoundException: SimpleApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

i am strugling with for the past 3 days
can any one get me out of this.......

thanks and regards in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60755


There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rajnishs Sinha

Joined: Jun 01, 2007
Posts: 5

Actually i tried with my name and it was not accepting it.So gave the name of my project that i am doing as display name and it worked.

Anyway i m sorry for violating the rules although unknowingly.I have updated my profile for the display name.

may i have the solution its urgent as the project i am doing is of very short duration and i need to finish it up quikly.

once again thanks in advance

Pravin Jain
Ranch Hand

Joined: May 20, 2007
Posts: 60
What is the url used from the browser to access the jsp?
I would be better to place the Applet class and the jar
somewhere within the application folder.
can try specifing codebase starting with http:

The Zen of Java Programming.
Rajnishs Sinha

Joined: Jun 01, 2007
Posts: 5
To acces a web page in my web application i have a request controller servlet.

1)It acts as a security gate between clients (web browsers) and the application Server.

2)Allows property values to be passed to a page.

i have my own custom page type which determines the look and feel of my page.

i have registered the SimpleApplet.jsp as SimpleApplet.

and i am calling it using the rc as


where localopal is my webapplication folder in my box with the following location


if you forget about everything above except the webapplications location

i also tried with the following url to acces the SimpleApplet jsp in my application framework with the help of rc(request controller)


where WEB-Schlumberger/pagetypes/SimpleApplet.jsp is the folder structure under my webapplication folder i.e localopal

please let me know how to use http:// type of code base and what url i should give in case of my webapplication for codebase attribute........

once again thanks and regards in advance

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41062
"codebase" must refer to a directory on the web hierarchy; it can't be just any directory (and in particular, it can't be an absolute path, since it will be interpreted relative to the web app root).

Try putting the class and jar files in the same directory as the JSP page, and remove the codebase attribute.

Ping & DNS - my free Android networking tools app
Rajnishs Sinha

Joined: Jun 01, 2007
Posts: 5
thanks Ulf Dittmer for responding,

I tried putting the class and jar files in the same directory as the JSP page
and then removed the codebase, but with no result.

My Applet class supporting jar files and the jsp file are all in the following location


i tried with removing codebase

now if i put the codebase then how to give the exact relative (http://....)codebase url for the above mentioned folder structure

i am sick with all the permutation and combination

please get me out of this trap. its urgent.

once again thanks in advance,
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41062
Which URL are you using to access that JSP?
Rajnishs Sinha

Joined: Jun 01, 2007
Posts: 5
url used to access the jsp is

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41062
Does it work if you address the JSP directly, like


and put the applet files in the pagetypes directory?
subject: ClassNotFoundException
Similar Threads
playing audio in an applet and embedding that applet into a jsp or Html file
put an applet into a web page
java: ClassNotFoundException
how to execute applet through webserver
Problem with Apache Axis Soap Monitor