Solved

downlaod an applet

Posted on 1997-10-26
3
222 Views
Last Modified: 2006-11-17
Hi
  I have built a simple server program to answer to browser requests (only to GET). But I didn t success to download correctly HTML page with an applet. The browser downloads correctly the HTML page but not the applet contained in this page. I have every time the same message, in the java console:

# Applet exception: error: java.lang.ClassFormatError: Bad magic number
java.lang.ClassFormatError: Bad magic number
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at netscape.applet.AppletClassLoader.loadClass(AppletClassLoader.java)

What can I do to make the browser downloads correctly an applet.

Thanks

Adel
0
Comment
Question by:Adel
3 Comments
 
LVL 10

Expert Comment

by:kollegov
ID: 1229544
Probably...problems with case sensitivity
Check CODEBASE, CODE and applet name in directory
Better to have URL to check :)


0
 
LVL 4

Accepted Solution

by:
rembo earned 100 total points
ID: 1229545


The magic number is the first few bytes of a file that
determine what type of file it is.

If the magic number is bad, then the file probably
needs to be recompiled.  It may have been corrupted
somehow.  

Can you view it with the appletviewer?

Try recompiling it, that should do it.

-Tony

0
 

Author Comment

by:Adel
ID: 1229546
Thanks for your answser.
But the applet is not corrupted, because the borwser downloads it correctly from the public_html when I use another server.
So the problem is somewhere else, may be because I don t send to the browser the correct information or the correct file format..

Adel
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question