# java applet error. class not found

**URL:** <https://forums.suse.com/t/java-applet-error-class-not-found/21749>\
**Category:** SLE Software Developer Kit (SDK)\
**Created:** [June 23, 2010, 5:36pm UTC](https://forums.suse.com/t/java-applet-error-class-not-found/21749 "2010-06-23T17:36:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [June 23, 2010, 5:36pm UTC](https://forums.suse.com/t/java-applet-error-class-not-found/21749/1 "2010-06-23T17:36:05Z")

</div>

I’m trying to write a simple HelloWorld applet. I wrote the  
HelloWorld.java code and compiled it with ‘gcj -C HelloWorld.java’ to  
create the HelloWorld.class file. I then created a HelloWorld.html file  
to load the class file. The error i’m getting is class not found (see  
below) when I click on the html file with my browser. I have all these  
files in the same directory, and have tried setting the CLASSPATH  
variable to that directory. Is there another path setting I need to make  
or perhaps I have a problem with my environment ? (sles10 sp1)

thanks in advance

## error:

load: class /cs/java/HelloWorld.class’ not found.  
java.lang.ClassNotFoundException: .cs.java.HelloWorld.class’  
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)

## contents of /cs/java directory

HelloWorld.class  
HelloWorld.html  
HelloWorld.java

## setting of CLASSPATH directory

/cs/java

## – usermode504

usermode504’s Profile: [http://forums.novell.com/member.php?userid=88439](http://forums.novell.com/member.php?userid=88439)  
View this thread: [http://forums.novell.com/showthread.php?t=414014](http://forums.novell.com/showthread.php?t=414014)
