Solved

downlaod an applet

Posted on 1997-10-26
3
213 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now