• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can anyone spot whats wrong with this HTML Applet tag?

 
Femi Alla
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am developing a website and I have an applet that's not being displayed on my home page. I have spent so much time trying to get this right but I can't see what's wrong. So, I decided to put up the HTML code that's supposed to display the applet here, probably someone would see what's wrong or have a suggestion. Any useful suggestions would be welcome. Here's the line of code that's not working
code]<Applet code = "GetPCNetAddress.class" height = 200 width = 600> </applet>
Any useful suggestions would be appreciated.
Thanks.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What browser, what version, is that the only class file? We need more information. Are you sure it's the HTML that won't work? What exactly is happening when you go to your home page? Does it appear the applet is trying to load? Do you get an error message?
 
Murali Nanchala
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, check in the properties if the JVM is enabled.
Murali
 
Mag Hoehme
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Femi,
what kind of message do you get? Do you get some kind of "Exception"? Do you keep the applet code in some subdirectory? Is it a jar-packaged applet?
 
Femi Alla
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for those responses. The applet doesn't look like it's loading like it does on my PC at home while trying to run the code(I go online from public terminals [cyber cafes]) which in any case would give me a better idea of what visitors to the site would see.
There is just a grey area which corresponds to the area I specified in the applet tags. But when I rest the cusor on the grey area, I get this message "Load: class GetPCNetAddress not found.".
The question of checking in the properties if the JVM is enabled shouldn't really arise, should it? I can't tell all the visitors to the site to do this.
It's also not a jar packaged applet and it is not in a subdirectory. Other gif files I point to this way work really fine.
Is still need help,pls.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well to me it sounds like 1 of 2 things.
1. Your class file is not in the same directory as your html file.
2. You have mistyped the name of your class file in your applet tag. Remember, it is case sensitive.
If these are not your problems, try this applet tag instead.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and you may want to take a look at Exploring Browser Support for Java 2 for more ideas on what tag to use.
 
Femi Alla
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for the answers. I also went to that other page I was referred to. My class file is in the same directory as your html file &
I didn't mistye the name of your class file in your applet tag I've done all.
I then used to code and replaced the line http://pathtoJRE/JRE/JRE1.3.exe" with http://java.sun.com/getjava/installer.html/JRE/JRE1.3.exe" but the PC I am currently on displays an error message that my current security settings prohibit running activeX controls on the page.
Is this what everyone who writes an Applet for display on a website has to go through or would I have avoided all these by using JDK1.1 to write this applet?
Thanks for all your help, but I still need answers...please.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic