Java in AT&T PWP  
Author Message
wayne.rawls





PostPosted: 2004-6-29 3:58:00 Top

java-programmer, Java in AT&T PWP Hi,
I was referred to you because I'm having a problem getting this to run in
AT&T PWP (Personal Web Pages). I compile the Java Program using NetBeans
IDE 3.6. I upload the .java, the .class and the .html files to my PWP
library.


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

public class AppHelloWorld extends JApplet
{
public void init()
{
resize(700,100);
}

public void paint(Graphics g)
{
g.drawString("Hello, Applet world!", 10, 25);
}
}
---------------------------------------------------------------
This is the page I run in the browser (Internet Explorer and Netscape).

<HTML>
<HEAD>
<TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>
<H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3>

<P>
<APPLET code="AppHelloWorld.class" width=350 height=200>
</APPLET>
</P>

<HR WIDTH="100%"><FONT SIZE=-1><I>Generated by NetBeans IDE</I></FONT>
</BODY>
</HTML>

This is the message I get from the browser:
java.lang.ClassFormatError: AppHelloWorld (Extra bytes at the end of the
class file)

The page will run in Edit*Plus and IE (FILE, OPEN, BROWSE) and Netscape
(FILE, OPEN FILES, select document).

Can you provide any information on how to get this to run in the browsers?

Wayne Rawls