| Author |
Adding Java to a Website
|
Erer erer
Greenhorn
Joined: Sep 09, 2012
Posts: 2
|
|
I am having trouble adding a java application to a webpage. Can I get some help?
I used
<APPLET CODE="Project1.class" HEIGHT=500 WIDTH=500></APPLET>
to load it to the page, but I keep getting when on the page.
ClassFormatError
Incompatible magic value 791627122 in class file Project1
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
That means that when the applet's container (i.e. the browser) asks for Project1.class from the server, the server gives it something which isn't a Java class.
Let's find out what: the first 4 bytes of it are 791627122 as a decimal number. As a hexadecimal number (get out your calculator which does the conversion) it's 2F2F4572. And converting to characters, that's "//%H".
So whatever your server is returning, it isn't a Java class. It's some kind of text, maybe an error page or something, which starts with "//%H". Check and repair your server configuration.
|
 |
Erer erer
Greenhorn
Joined: Sep 09, 2012
Posts: 2
|
|
My Javascript runs fine in Netbeans
and im sure not how to perform the function you specified in your post
|
 |
 |
|
|
subject: Adding Java to a Website
|
|
|