Solved

downlaod an applet

Posted on 1997-10-26
3
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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…
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…
Suggested Courses

615 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