• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class not found!

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body,

I have installed "j2sdk1.4.2_03" on my system,and then created an applet like this:

import java.awt.Graphics;
import java.awt.Font;
import java.awt.Color;
import java.awt.*;
import java.applet.*;

public class mo extends java.applet.Applet
Font f = new Font ("Arial" , Font.BOLD , 36);
public void paint ( Graphics g )

I compiled it with "javac" and made its class. After that, I write an HTML file to call my applet :

<applet code="mo.class" codebase="../">

"mo.class" is the name of my class file that created with this command:

javac mo.java

ok. I think all of these works are very simple and easy, isn't it?
BUT this applet runs on my computer and works true, but when I move these files ( mo.htm , mo.class) to another computer with out "j2sdk1.4.2_03", the applet doesn't work and I get this error:

"mo class not found"

I have tried to run it on more than 7 computers that Java was enabled on all of them but no one can show the applet.Why?
I think this is the simplest work. Why applet can not run?
Please help me to solve my problem.
Before this I write and run more than 20 applets , but I don't know why I can't run this one!

Ok,I'm waiting for your help.
Thanks a lot,
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your applet tag, you have specified codebase=../, so I think you must place the class file one directory upper than the html file.


this is a wild-wild guess
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!