Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError: Ahmed (wrong name: intoapplet/Ahmed )  RSS feed

Ahmed Zaki
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been searching for a solution for 3 days .

Your advice:
If you have named your class 'test' Coding convention recommends it should be 'Test '.

This helped me along with not including the package declaration in my Java class. By saving the project with the first letter of it's name as capital.(eclipse).

-------------------------------------------------------------Java code: ----------------------------------------------

import java.awt.*;
import javax.swing.*;

public class Ahmed extends JApplet {

private static final long serialVersionUID = 1L;

public void paint(Graphics g){
g.drawString("my name is Ahmed Zaki wow this actually works",300,300);

---------------------------------------------------------------HTML code-----------------------------------------------

<title>Tutorial applet</title>

<Applet code="Ahmed.class" width="400"; height="300";>


--------------------------------------------------------------Directory on the open-source SFTP , FTP, WebDAV and SCP client-----------

Both , class & html file , in the /public_html/ folder by using "WinSCP" which is a free and open-source SFTP, FTP, WebDAV and SCP client for Microsoft Windows. Its main function is secure file transfer between a local and a remote computer.


directory for html file = /public_html/index.html
directory for class file = /public_html/Ahmed.class

example no2:

+-- public_html
| +-- index.html
| +-- Ahmed.class


Sorry if I mentioned too much details , but it was because I wish no one would have to spend 3,5 days to solve a problem like this. Who knows , maybe it will help some one some day like , just like you did and some other nice people.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!