There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell display drive driver drivers email error excel explorer firefox firefox 3 hard drive internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound sprtcmd.exe trojan usb virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Help With Java


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
dcf-joe's Avatar
Computer Specs
Member with 53 posts.
 
Join Date: Jul 2007
21-Jan-2008, 02:47 PM #1
Help With Java
I have a website on freewebs.com. I have uploaded a file called BodyMassApplet.html onto the website. I go to the HTML editor, and type in:
<HTML>
<APPLET CODE = "BodyMassApplet.class" WIDTH = "600" HEIGHT = "600">
</APPLET>
</HTML>
However, whenever I go to view my website, the java applet won't load. I have the latest runtime environment 1.6.03.
HELP PLEASE
Chicon's Avatar
Computer Specs
Distinguished Member with 6,679 posts.
 
Join Date: Jul 2004
Location: 50° 34' 07.13" N - 04° 10' 23.
Experience: Second socks retriever
21-Jan-2008, 03:24 PM #2
Hi dcf-joe,

You still have to upload the BodyMassApplet.class file on your website to solve the problem.
dcf-joe's Avatar
Computer Specs
Member with 53 posts.
 
Join Date: Jul 2007
21-Jan-2008, 06:24 PM #3
I already did upload the file.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
21-Jan-2008, 08:40 PM #4
Your browser should have a "Java Console" you can open to see if any Java exceptions are being thrown. Find that console and open it and post any Java errors you are getting.

Peace...
dcf-joe's Avatar
Computer Specs
Member with 53 posts.
 
Join Date: Jul 2007
21-Jan-2008, 08:43 PM #5
These are the errors as according to Firefox's Java Console:

java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file BodyMassApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
21-Jan-2008, 08:46 PM #6
Sounds like your BodyMassApplet.class file is corrupt somehow. How did you upload it to the server? I would recomile BodyMassApplet.class, just to make sure it's cleanly compiled and upload it to the server using a binary transfer method, not ASCII (plain text).

See what happens.

EDIT: Ok, based on this thread, it sounds like the JVM is having difficulty locating your Java class. Java is case sensitive so make sure the BodyMassApplet.class file name is mixed case on the server.

Peace...
dcf-joe's Avatar
Computer Specs
Member with 53 posts.
 
Join Date: Jul 2007
21-Jan-2008, 08:50 PM #7
This is how I uploaded it:

I went into TextPad, opened up my BodyMassApplet.html file. When the file opened up, I copied the text and pasted it onto my website with the HTML editor. I had previously uploaded the actual BodyMassApplet.java file onto the website.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
21-Jan-2008, 08:52 PM #8
The problem isn't with the HTML file, it looks like it might be the location of the Java class file. Now, if you uploaded BodyMassApplet.java and NOT BodyMassApplet.class, that is probably the problem. You need to compile the .java file (the source) to a .class file (the executable code) and upload the .class file to your server using a binary transfer method.

How did you upload BodyMassApplet.java?

Peace...
dcf-joe's Avatar
Computer Specs
Member with 53 posts.
 
Join Date: Jul 2007
22-Jan-2008, 04:12 PM #9
Thanks
Thanks for your help guys. I realized that I uploaded the HTML file, and then called the HTML file with my insertion of the html text. The actual class file was never there, so the call didn't know what to do. So, I uploaded the class file, and the applet works. Once again, thanks guys!
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,716 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
22-Jan-2008, 07:01 PM #10
Great! Glad you got it sorted out.

Peace...
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:57 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.