The "APPLET" Tag

On the web site "http://geocities.com/xyz" I have the following files :
1. index.html
2. myJar.jar
2.1 mainClass.class
2.2 someOtherClass.class
2.3 pic.gif
In the index file, there is the following tag :
<code>
<APPLET code="mainClass.class" codebase="myJar.jar/" archive="myJar.jar" height=500 width=550></APPLET></code>
I get the error that the main class cannot be found

Codebase is a path from where the jre will start looking for class files or jars.
If I have a codebase value of "http://www.gecicties.com/hello" and a code value of
"hello.class" (no jars) than the jre will look for
http://www.gecicties.com/hello/hello.class
no matter where my page is even if it's started from the harddisk (like c:\myhtm.htm).
You can allso use relative paths in codebase for example:
my html file is in http://www.geocities.com/hello/htmlfiles"
the codebase is
../classes
the code is again hello.class
than the jre will look for
http://www.geocities.com/hello/classes/hello.class
The .. in codebase means 1 dir up so ../../ would mean 2 dirs up and ./ means current
dir.
If all the files are in the same folder I would suggest not using codebase at all and not
use the .class after the calue for code. It will look like this:
<applet
  code="mainClass"
  archive="myJar.jar"
  ...(the rest)
>
</applet>

Similar Messages

  • IE ignoring the APPLET tag!

    My IE browser fails to load applets, the following messages is displayed when i try to run the demo applets that come with jdk :
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!
    i tried re-installing the jre and changing IE security options with no luck.
    It was working before, it is possible i installed some software that updated how IE behaves.
    IE version : 6.0.2800.1106.xpclient.010817-1148 SP1 3283
    any help appreciated

    Maybe try using the HTMLConverter program ( should be on this site somewhere ).
    Let it convert your HTML file to use an Object tag instead of an applet tag.
    That should override any silliness that IE might have...
    regards,
    Owen

  • Could the applet tag be any more unintuitive?

    I've got an html file that's in the same directory as my jar file, WebUpload.jar.
    WebUpload.jar has the class WebUploadUI.
    The class WebUploadUI is in the package fileTransfer.
    So... what's the applet tag to load this?
    <applet codebase="." code="fileTransfer/WebUploadUI.class" archive="WebUpload.jar" width=250 height=130>
    Doesn't work. I find it hilarious I can write a multithreaded client socket without much trouble but I can't figure this out.

    There are examples and explanations here:
    http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

  • Your browser is completely ignoring the applet tag

    I installed the 64bit jre on a windows 7 system
    Windows 7 64bit + Java 1.6.0 22 +++
    when i try to view
    http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/example1.html
    i get a message saying
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!
    Does anyone have an idea why ?

    yes: Thank for help
    Still i have the problem to show applets in web browser. it fails the execution of applet tag and show the error message NORMALY alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!
    can u please give me a solution for that

  • How will the applet tag behave for users without Java?

    I am considering using an applet I have created as a splash screen for my website. But I am worried that by doing this I will loose all the visitors that don't have Java. Is there a way I can have the splash screen detect whether or not the user has Java? If so, is there a way I can have the splash screen automatically forward the non-java users to the main page? Maybe I could put something between the <applet></applet> tags?
    �Caleb�

    That doesn't help. Had you read my post more carefully you would have better understood what I wanted. In any case, I have already figured out how to automatically forward the non-Java users to the main page. The only thing I worry about now is about the people who's computers crash whenever they try to run a Java applet.
    �Caleb�

  • Get JSP file to run with an applet tag under JDeveloper

    I Created an applet and an html file under JDeveloper. with the applet tag in the html file.
    when I run the html file the applet runs perfectly.
    I Created a jsp file in the same project with the applet and the html file under JDeveloper. I copied and pasted the applet tag from the html file to the jsp file.
    When I try to run the jsp file under JDeveloper I get
    java.io.FileNotFoundExceptions for all of the jar files in the Applet tag ARCHIVE and for the applet tag CODE
    This is the applet tag that I copied and pasted from the html file to the jsp file
    BEGIN:
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    END:
    Here three example of the exceptions that I got BEGIN:
    1.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    2.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    3.
    java.lang.ClassNotFoundException: myapplet.Applet1
    Here three example of the exceptions that I got END:
    This is the html file that works BEGIN:
    <HTML>
    <HEAD>
    <TITLE>
    Title
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    This is sample HTML text.
    </H2>
    <BR>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    </BODY>
    </HTML>
    This is the html file that works END:
    This is the JSP file that does not work BEGIN:
    <!--%@ page contentType="text/html;charset=windows-1252"%-->
    <%@ page import = "myapplet.Applet1, java.util.Enumeration, java.util.Vector, javax.swing.JFrame, java.lang.*" contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET-->
    </body>
    </html>
    This is the JSP file that does not work END:
    I would like to know what I need to do so that I can run
    the Jsp file under JDeveloper with the applet tag without any exceptions.

    Hi,
    I meet the same problem and can not get a solution from this forum or other forum in internet, either.
    Have you already solved this problem? Can you tell me your solution? thanks in advance.
    Regards

  • APPLET tag issue

    Hello
    When practicing coding applets I am getting the following error message:
    Your browser is completely ignoring the <APPLET> tag.
    Do I need to change a setting in IE?
    Thanks
    Steve

    Hello
    When practicing coding applets I am getting the
    following error message:
    Your browser is completely ignoring the <APPLET>
    tag.
    Do I need to change a setting in IE?
    Thanks
    SteveHello
    Any further suggestions on this please.
    I also have a query concerning Appletviewer. When I try to see my applet through DOS using aooletviewer (as opposed to looking at the HTML page - which doesn't show the applet anyway - maybe this is related to the post I have sent above), it doesn't work. It's as if DOS thinks the appletviwer is not in the c/java/bin directory (but it is).
    Any advice, please.
    Steve

  • My browser doesn't find the applets!

    I have IE 5.5 & I'm new to Java programming. Look at this two files:
    page4applet.html
    <html>
         <head>
              <title>ProvaApplet</title>
         </head>
         <body>
              <h1>Test page for Applet Class</h1>
              <applet code=Applet.class width=300 height=300></applet>
         </body>
    </html>
    Applet.java
    import java.awt.*;
    public class Applet extends java.applet.Applet
         public void init()
         public void paint(Graphics g)
              g.drawString("...", 50, 50);
    IE reports the "Applet class not found" error. (Applet.java, Applet.class, page4applet.html are in the same dir).
    There must be a silly reason. But I can't figure out what it is.
    (I have the jdk 1.4.0 beta3 installed.)
    Thanx a lot.

    The reason behind all this... bl@#$dy Microsoft.
    When you use the applet tag, IE will use Microsoft Virtual Machine by default which only recognizes Applets compiled with JDK 1.1. If you already has downloaded the Java Plug-in and enabled it in the browser, then the new applets will display. However, old applets will get distorted somehow. The object tag in the html by the html converter is to tell the browser that the applet that it is trying to load is compiled by the new JDK and shld be run using the Java plug-in.

  • applet tag regarding JAR file

    Is there something wrong with the following applet declaration?
    <applet code = "Sheep2.class" archive="Sheep2.jar" width = 500 height = 300
    ALT="If you could run this applet, you'd see a sky, a field, and a moon.">
    Your browser is completely ignoring the <APPLET> tag!
    </applet>
    Works fine (it seems) on my Windows 98 computer with IE 6.0280, but does not work on the same computer when I access the page calling the applet using AOL's v.9 browser.
    I used HtmlConverter to convert the above to Extended version (covering all platforms), and still does not work with AOL's browser. HtmlConverter reported no errors, but now IE shows an error icon in its status bar when I access the page even offline.
    Other html files I converted using HtmlConverter work fine with AOL's browser. They don't have "archive" attribute.
    What could be going wrong? My guess is JAR file reference is causing problems.

    I did more Html Conversion today. I ran one file which didn't show any error mark in the status bar of IE through HtmlConverter. I ran the new file generated by HtmlConverter and an error icon appeared in the status bar of IE. My Java Console didn't show any message. So, it must be an error in the applet related info HtmlConverter generated was not 100% html compliant..
    BTW, I started speculating the cause of my applets not working on the computer of oen of my friends is simply that her Java Plug-in cannot handle Swing components' J classes.

  • Do static classes persist for the lifetime of the applet or the JRE in 1.4

    I have an application that runs in a web browser and uses several applets that share data between each other using a static class. This method works fine for version 1.3 but not in 1.4.x. Do static classes now only exist for the lifetime of the applet?

    I had a similar problem and solved it by setting the codebase attribute on the applet tags. The only documentation I have been able to find about this issue is here: http://java.sun.com/products/plugin/1.3.1_01a/new.html#classloader

  • applet tag vs Object tag

    As per W3Schools HTML applet tag is not supported in HTML5. Need to use <Object> tag instead of <applet> tag.
    For more details follow this link: http://www.w3schools.com/tags/tag_applet.asp
    http://dev.w3.org/html5/spec/obsolete.html#the-applet-element
    Point 11.2 Non-conforming features
    So, I go ahead and the change the code as below depicted.
    Below code that is working with <APPLET> tag:
    +<Applet+
    style    = "position:absolute;border:0px;left:184;top:95;height:180;width:364;"
    code     = "jtreeviewapplet.JTreeViewAppletMain.class"
    name     = "TreeView"
    id       = "TreeView"
    hspace   = "0"
    vspace   = "0"
    align    = "top"
    archive  = "/Project/HTML/ABC/XYZ.jar,/Project/HTML/ABC/ABC.jar"
    MAYSCRIPT>
    +<PARAM NAME="onSelected" VALUE="onSelect_Handler">+
    +<PARAM NAME="onFinishNormalize" VALUE="onFinishNormalize_Handler">+
    +</Applet>+
    Here is the snippet, whcih have been changed to <OBJECT> tag so as to support HTML5 in future:
    +<OBJECT type=" application/x-java-applet"+
    style    = "position:absolute;border:0px;left:184;top:95;height:180;width:364;"
    name     = "TreeView"
    id       = "TreeView"
    hspace   = "0"
    vspace   = "0"
    align    = "top"
    +>+
    +<PARAM name="code" value=”jtreeviewapplet.JTreeViewAppletMain.class”>+
    +<PARAM name="codebase" value="/Project/HTML/ABC/">+
    +<PARAM name="archive" value=" XYZ.jar">+
    +<PARAM name="archive" value=" ABC.jar">+
    +<PARAM name="scriptable" value="true">+
    +<PARAM NAME="onSelected" VALUE="onSelect_Handler">+
    +<PARAM NAME="onFinishNormalize" VALUE="onFinishNormalize_Handler">+
    +</OBJECT>+
    After changing the *<applet>* tag to *<object>* tag , my applet itself is not loading and it gives class not found exception for jtreeviewapplet.JTreeViewAppletMain.class.
    (Note: For both working and not working condition, I am using latest JDK 1.7 update 9 for compiling the code and in my system I am having latest JRE1.7 update 9 to run the applet code. I am using InternetExplorer 8 and InternetExplorer 9 browser)
    Can anybody help me to find out where I am going wrong?
    Edited by: 975931 on Dec 12, 2012 1:24 AM

    You might want to stick to the documentation:
    http://docs.oracle.com/javase/tutorial/deployment/index.html
    and use the deployment toolkit.
    PS: use \ tags when posting anything code related. That makes it readable and it keeps the forum from trying to interpret it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Applet tag question

    I am working with applets and have been getting the classdefnotfounderror exception and a wrong name error.
    After pouring over the archives and messing around, I have found a
    solution to my problem, but I don't know why it works. I think it has to do with packages, but I'm not sure.
    I have two versions of Asteroids, one which has "package Asteroids" at the top
    of each file, and one that has no package.
    First with the version that is in a package: If I have the html file in the
    same directory as the class files, I cannot get the applet tag to work
    properly. If I back it up a directory (just outside the Asteroids directory), this works:
    <applet
      codebase = "."
      code     = "Asteroids/Asteroids.class"
      width    = "640"
      height   = "480"
    </applet>
    {code}
    One old post I found said that the wrong name error indicates that the qualified name is incorrect ( so my incorrect name would be Asteroids.class) and that the full name should include the package, so mine would be Asteroids/Asteroids.class, I think. Is that correct? If so, why wouldn't this code work inside the same directory as the class files?
    For the version that is not in a package, the opposite seems to work.
    {code:java}
    <applet
      codebase = "Asteroids/"
      code     = "Asteroids.class"
      width    = "640"
      height   = "480"
    </applet>
    {code}
    This code works for the version which is not in a package, but does not work for the version in a package, ( and vice versa for the code above). It seems like either code should work in either case. What am I missing?
    Thanks,
    Matt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I don't know what your understanding of packages and applet codebase is. These 2 tutorial sections should clarify your understanding, though.
    http://java.sun.com/docs/books/tutorial/java/package/index.html
    http://java.sun.com/docs/books/tutorial/deployment/applet/html.html

  • How to run the applet in JSP

    hi,
    im trying to run an applet from JSP i am not able to see the output of the applet on the JSP page?
    <APPLET CODE="com.metro.supex.admin.SampleApplet.class" HEIGHT="25" WIDTH="125" ALIGN="bottom"></APPLET>
    this line of code is included in JSP to run the applet, it is giving error
    java.lang.ClassNotFoundException:com.metro.supex.admin SampleApplet
    please can you help me in this matter.

    And don't use the applet tag, use object embed.
    use the htmlconverter in the jdk bin dir to convert an applet tag.

  • I have a sample applet tag in my browser

    Here is the applet tag in my browser
    <applet id="Laufschrift1" name="Laufschrift1" code=
    "TickerTape.class" codebase="../../scripts/" height="25"
    width="780">
    What does ../../scripts denote.
    As far as i know CODEBASE = ./ denotes the current directory or the classpath + the classname
    But i have seen CODEBASE = ../../scripts/ for the first time.
    Supposing that the webpage address is www.abc.com then CODEBASE = ../../scripts/ will be ??
    I am new to java and so i need someone's help

    "../" means "the directory above". So "../../scripts/" means "the directory named scripts located in the directory two levels above the current directory."

  • Javascript to Java using APPLET TAG

    Can I call an applet method using Javascript? The applet is exposed through the <APPLET> tag. I can easily do it using MS JVM but Sun JVM doesn't let me do it. I look at the plug-in documentation and it only mention using <OBJECT> when doing Javasript to Java.
    Thank you

    Possibly. I've never done it myself but I've seen reference to a a Javascipt <> Java communication package on these forums before which may be what you are looking for.
    Some info here:
    http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/packages.htm

Maybe you are looking for

  • To Use  Cursor or  TYPE table Index by PLS_integer

    Hi All, Let's see if I have table with no. of records 19,26,20,000. If I want to loop through all the records which will be a optimized way To Use Cursor or TYPE table Index by PLS_integer. Please guide. Thanks.

  • SAP Tutor error on Windows Vista

    Hello people We download the SAP Tutor player (https://websmp206.sap-ag.de/~sapidp/011000358700001571672002E/PERSONAL_INSTALL.EXE) and install it, when we try to use it close unexpectedly for windows vista. Somebody knows the cause of this error or k

  • Use Camera with capture card

    Hi, I'm using the camera method to view input from a webcam or to view input from my capture card locally. My webcam looks perfect, but I don't see any input from my capture card. Of course I've got input (tested with windows media encoder). Should I

  • DIY  defragmentation or do-it-yourself defrag without third party software?

    Ok, I admit it I am in the Irish mentality now - humour me... Any files under about 20MB, are already automtically defragmented in the breath of the MAC as I have learned in the past. BUT, my photoshop files are always in excess of 400 mb some reach

  • Strange Behavior between identical servers

    We have an interesting problem that is effecting the performance of an application on our production servers but is not happening on our test servers. All servers are the same, Win2k server sp3 running Weblogic 5.1 sp9. Our clients were complaining o