How-to: APPLET-tag for applet in com.foo.bar?

Hi,
I have an applet in the package com.foo.bar and am struggling to get the applet-tag in my HTML right to get the applet loaded.
Can anyone tell me how it should look like?
Furthermore, I am planning to store the applet in a jar (say MyApplet.jar) How would the a HTML look like in that case.
I can assure that the applet runs, because when I remove the package statement in the applet class it all works excellently.
Thanks in advance,
Iwan

when you jar it. be in the directory that the com package folder exists in. then use "jar cvf MyApplet.jar com/foo/bar/*.class"
This will tell the browser what jar file it needs so that it can get the classes.
<param name="archive" value="MyApplet.jar">
This will tell the browswer which class contains the init method in the jar.
<param name="code" value="com.foo.bar.Class">
Class being the name of the class with the init method in it.

Similar Messages

  • How to make packages for applets

    hi all...
    i tried the following code for applets
    package imp;
    import java.awt.*;
    import java.applet.*
    <applet code="Ex1" widt=400 height=400>
    </applet>
    public class Ex1 extends java.applet.Applet
    ---------code------
    and then i complied and used applet viewer to start the applet...but it gave the error access denied
    without the packaging, this worked fine
    regards,
    kalyan

    and then i complied and used applet viewer to start
    the applet...but it gave the error access denied If I remember correctly, when you have a package to the class, the class file should be placed in a subfolder called imp and the applet tag should use the fully qualified classname imp.Ex1

  • JSP Plugin tag for applets with codebase - WLS 6.1 sp2

              Could someone please tell me what I am doing wrong?
              I have the following Plugin tag in my JSP.
              <jsp:plugin type="applet"
              code="com.xxx.efm.frontend.view.EFMApplet"
              codebase="/lib"
              archive="applets/EFMFrontend.jar, EfmCommon.jar, TrimmedWeblogic.jar, dom4j-full.jar,
              /classes/"
              jreversion="1.3"
              nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab">
                   <jsp:params>
                        <jsp:param name="Delimiter" value="<%=delimiter%>" />
                        <jsp:param name="ComponentMap" value="<%=componentMapValues%>" />
                        <jsp:param name="ServerConfig" value="<%=serverConfigValues%>" />
                        <jsp:param name="GUIConfig" value="<%=guiConfigValues%>" />
                   </jsp:params>
              </jsp:plugin>
              I am trying to load the JSP using Netscape 4.7. When I don't have a plug-in installed
              the page
              displays "Click here to get the plugin". On clicking on it the browser pops up
              a "Plugin not loaded" dialog.
              All this is fine except that the dialog says it can retrieve the plugin from "/lib".
              When I click on
              "Get the plugin" button the new browser window tries to load the URL: http://localhost:2002/lib/?application/x-java-applet;version=1.3.
              It totally ignores the netscape URL for plugin. Something similar happens with
              IE as well.
              I tried the same JSP without the codebase tag and all worked fine (except for
              my applets). Yeah, I can append a "/lib" to each of
              my jars in my archive and it just might work. But should I be doing anything different?.
              Any help is appreciated.
              Thanks,
              Gopal
              

    I am facing the same problem with netscape (4.7x). Gopal, did you find any
              solution?
              IE works fine for me. I use the foll pluginurl
              iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#V
              ersion=1,3,1,1"
              _Jp
              "Gopal" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Could someone please tell me what I am doing wrong?
              >
              > I have the following Plugin tag in my JSP.
              >
              > <jsp:plugin type="applet"
              > code="com.xxx.efm.frontend.view.EFMApplet"
              > codebase="/lib"
              > archive="applets/EFMFrontend.jar, EfmCommon.jar,
              TrimmedWeblogic.jar, dom4j-full.jar,
              > /classes/"
              > jreversion="1.3"
              >
              nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              >
              iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"
              >
              >
              > <jsp:params>
              > <jsp:param name="Delimiter" value="<%=delimiter%>" />
              > <jsp:param name="ComponentMap" value="<%=componentMapValues%>" />
              > <jsp:param name="ServerConfig" value="<%=serverConfigValues%>" />
              > <jsp:param name="GUIConfig" value="<%=guiConfigValues%>" />
              > </jsp:params>
              > </jsp:plugin>
              >
              > I am trying to load the JSP using Netscape 4.7. When I don't have a
              plug-in installed
              > the page
              > displays "Click here to get the plugin". On clicking on it the browser
              pops up
              > a "Plugin not loaded" dialog.
              > All this is fine except that the dialog says it can retrieve the plugin
              from "/lib".
              > When I click on
              > "Get the plugin" button the new browser window tries to load the URL:
              http://localhost:2002/lib/?application/x-java-applet;version=1.3.
              > It totally ignores the netscape URL for plugin. Something similar happens
              with
              > IE as well.
              >
              > I tried the same JSP without the codebase tag and all worked fine (except
              for
              > my applets). Yeah, I can append a "/lib" to each of
              > my jars in my archive and it just might work. But should I be doing
              anything different?.
              > Any help is appreciated.
              >
              > Thanks,
              > Gopal
              

  • How to set IIS for Applet making it can run at any IE client.

    I made an applet with java. It works fine under JDK.
    After that, I made a web page with the applet embedded in.
    But it can only run on those client computers if the computers has installed JDK.
    Could you tell me how to set IIS so that my applet can run on all the client computers no matter whether they have JDK installed or not?

    It would have nothing to do with IIS. Your applet apparently requires a "newer" version of Java than what comes with the browser by default. So either make your applet comply with the lowest common denominator (no Swing classes, only AWT, for example), or require your clients to install the newer Java plugin.

  • How to configure netlet for applet

    I'm trying to create a netlet rule that will allow me do download an applet from server 1, download all the session configuration from server 1 thrue the port 8999, then when all th session config is downloaded it will start a telnet connection to server 2 thrue port 23.
    server 1 ip is 207.207.1.85 and the server 2 ip is 159.206.32.253
    here what i have so far as a rule
    myrule|/Folder/my.html|true|8999|207.207.1.85|8999|3001|TARGET|23
    the target is 159.206.32.259

    The following will help you to configure netlet rules for an applet . You can create this rule either for a domain, role or for a specific user.
    If you are downloading an applet from a different server than the Portal server platform server, you have to use the <local Netlet listen port:applet server:target server port> to specify the local Netlet listen port and the target server port that the applet is coming from.
    myrule|/dir/applet.html|8999:207.207.1.85:8999|3001|TARGET|23
    To make this rule show up in the Netlet provider, you then Click on the Domain (Role and User, if applicable) Applications -> Desktop link, and under the 'Channels' heading, Select the 'iwtNetletProvider' channel, and click on the 'Edit Channel' button. Under the 'Targets' section, add a new target to the Netlet Provider like this:
    myrule|hostname
    Thanks,
    Raj_indts
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • How get complete source for applet demos?

    I am interested in obtaining the complete source for the applet demos, especially the molecule viewer for personal study. Some of the .class files do not have corresponding .java files made available. Who can help me out with this?

    hehe .. what about the copywrite for those demos ... did you try to read that first?

  • How to create LSMW for a transaction having scroll bar

    Hi all,
    I am trying to create an LSMW for MP)! transaction for Uploading AMPL (Approved Manufacturer Parts list data) data.
    For this LSMW is not working fine when i need to upload more number of records. Suggest me some way to solve it out,Also provide me some code samples and process if it can be handled with BDC.
    Thanks,
    Pavan.

    you can solve it with bdc:
    e.g. a table control contains only 10 entries , you've to program the dynpro-change ( in german "Bildwechsel")
    with sth like this:
    ERG = BUZEI MOD 10 .
      IF ERG = 1.
    Dynpro darf nur alle 10 Zeilen prozessiert werden -
        PERFORM BDC_DYNPRO USING 'SAPMF10B' '0150'.             "ins
      ENDIF.
    add 1 to buzei.
    A.

  • Class not found error for applet.

    This is probally a really simple mistake but I've tried everything and can't find it.
    My applet works fine with applet viewer - I'm running it from JBuilder. But when I open my html file in the browser it gives me a 'Class not found' error. I've tried running other applets (my own and demos on this site) and they work fine.This is the applet tag code:
    <applet code = "Rotary.class" width = "650" height = "580" align = "top">
    <!-- coordinates of sectors -->
    <param name = "sector0" value ="234,215,244,207,154,43,125,63">
    </applet>
    The class file is in the same directory as the HTML file. Do I need to specify the codebase? I tried that too - giving it the full pathname of the class.
    In the Java console it said that it couldn't find "C:Project\Rotary\javax\swing\japplet"
    I don't think it could have anything to do with the fact that I'm using swing because the other applets I used used swing.
    Please help - I'm really running out of ideas here!

    You have a similar problem like I had.
    You seem to have a too old JAVA environment for the browser - I had a too new environment.
    For all who are experiencing the same problem!
    Problem:
    You're compiling your applets with a quiet modern compiler (i.e. Netbeans Version 3.5.1)
    You are able to compile your applets without any problems but if you try your applets in "real life", the browsers can't interpret your applets [class not found]. (I tested Internet Explorer 6.0 and Netscape Navigator 4.7)
    So you need a plugin for the new JAVA environment because the JAVA environment of the browser is older than that which the applet needs.
    Well, you have the choice to demand to every user of your applet to download the new Java Runtime Environment, but then don't wonder why nobody visits your site!
    But, don't worry: I figuered out another solution, that Netbeans (www.netbeans.org) allows to compile in different JAVA versions.
    Solution:
    What you have to do is:
    - Install a previous version of JDK (i.e. JDK 1.3 - I would suggest, lower versions don't work with Netbeans 3.5.1 and JDK 1.3 is enough for IE 6.0 and NN 4.7, which I tested)
    - Go into the "bin"-directory of Netbeans (i.e. c:/netbeans3.5.1/bin)
    - Open the file "ide.cfg" (with notepad or any other texteditor)
    - You see a line like: jdkhome "C:\java\j2sdk1.4.2" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - Change the path to your other JDK you wish, like: jdkhome "C:\java\jdk1.3" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - That's it, you can compile your applets in a previous version of JAVA so that "older" browser user don't have to install a plugin for the new JAVA environment.
    Have fun!
    If you have any questions I would be pleased to help you.
    If this tip helped you already I would be pleased if you would send me a quick email with your experience.
    My email: [email protected]

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • 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.

  • How can extra tags be removed when creating web services

    Greetings,
    If the "tables" of the function call (which a web service is generated from) has all the returned values with the correct tag but it also has the tag for the table name, how can the table name tag be eliminated before submitting the message?
    Here is the scenario: can create a function call and generated a web service from it.  The import and export values have the proper tags.  However, the return values needs to be in a table.  when the message is generated,
    - tags for each value in the returned table is generated also
    - tags for the table name is also generated.  in the below example, how can the tags for <ttable> </ttable>and <item> </item> be removed prior to submitting the message?
    FUNCTION zquery
      IMPORTING
        VALUE X TYPE  X1
    EXPORTING
       VALUE(RETURN) TYPE  BAPIRET2
    TABLES
          Ttable STRUCTURE  zstructure
    soap generated:
    <Ttable>
    <item>
    <title></title>
    <FirstName></FirstName>
    <MiddleName></MiddleName>
    <HouseNumber></HouseNumber>
    <Street></Street>
    <City></City>
    <State></State>
    <Zip></Zip>
    </item>
    </Ttable>
    Thank you in advance for any suggestions
    B.A.

    If you click the bookmarks menu item in the window, on the left, you should be able to select and delete the separators, on the right.

  • 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�

  • Best IDE and how-to create HTML for a swing Applet

    Can you help me out? I've been using, and teaching with the old Symantec VisualCafe product from long, long, ago. It still works fine & I can even use it to build JFC/Swing Applets etc. But a few things have occurred. For one, a way back, Symantec sold VisualCafe to WEBGAIN - who now has gone out of business and sold it to a company called TOGETHERSOFT - who doesn't support it any longer.
    This isn't really a big deal to me, because I can still build and deploy applets that are pre-swing easily enough. (as can my students)
    HOWEVER... I'd like to be running with the LATEST Java (I think it's 1.4.01) and I'd LIKE to use whatever is the best development environment I can use - especially one I can recommend to my students. Do you know what that should be?
    What's more, I'd still like to take some JFC/Swing created applets (even if compiled with the older VisualCafe IDE) and generate the HTML to allow 1.4 enabled browsers to run them (this is the case for the schools versions of Explorer and Netscape). Now, the HTML I have INSTALLED for the students used the HTML converter - back in 1.2 to produce the HTML at the bottom of this. This code no longer works now with current browsers. Do you know HOW one makes a jfc/swing compiled applet run on the latest browsers?
    Any help or direction you can give would be appreciated.
    thanks,
    Bobby Berns
    [email protected]
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 756 HEIGHT = 396 codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
    <PARAM NAME = CODE VALUE = "lottery.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.2" java_CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 >
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->

    Bobby,
    It's been a while since I've used the HTML Converter, but if I had to guess I'd say you need a newer version than what you have. Also, doesn't the converter allow you to choose which JDK you want to use (in which case you could select 1.4)? Again it's been a while so bear with me. Another option would be to put all the Swing classes into a .jar file (typically called swingall.jar) on your server and include that file as an attribute in your applet tag like this:
    <APPLET CODE="yourApplet.class" ARCHIVE="swingall.jar">
    This way you don't have to use the Java Plug-in, however the initial download time of the .jar file can be significant.
    As for an IDE, I've always been happy using a text editor like UltraEdit. However, I've heard good things about Forte, and hey, it's free!
    Regarding Christina's post, that solution will only work if the Applet does not use Swing components (and Bobby specifically said it does). By using the <OBJECT> and <EMBED> tags, rather than the <APPLET> tag, you force the browser to use the Java Plug-in (rather than the browser's default JVM).
    Hope that helps,
    - Sheepy

  • How to make pack200 work with applet tag ?

    Hello All,
    Sorry for the cross-post.
    I tired getting the advise on java.net forum but with no success. Can someone here please help with this or direct me to right direction.
    I am trying to use the pack200 compressed jars for my Object/Applet tag, but not sure how to go about using it.
    I have followed the instructions for jarsigned pack200 jars.
    http://java.sun.com/j2se/1.5.0/docs/guide/deployme.../deployment-guide/pack200.html
    But now how do i use them in my Object tag, what should i name the files in my cache_archive parameter :
    example:
    something like :
    <PARAM NAME = CACHE_ARCHIVE VALUE = "final.jar" />
    or :
    <PARAM NAME = CACHE_ARCHIVE VALUE = "final.jar.pack.gz" />
    renaming : final.jar.pack.gz --> final.jar ??
    I tried both the above options but none of them works.
    network: Wrote URL http://myserver.net/Stream/lib/final.jar to File C:\Documents and Settings\I025204\Application Data\Sun\Java\Deployment\cache\6.0\60\366763c-2a096009-temp
    java.util.zip.ZipException: ZIP file must have at least one entry
    at java.util.zip.ZipOutputStream.finish(Unknown Source)
    at java.util.zip.DeflaterOutputStream.close(Unknown Source)
    at java.util.zip.ZipOutputStream.close(Unknown Source)
    at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
    at com.sun.deploy.cache.Cache$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
    at com.sun.deploy.cache.DeployFileOutputStream.close(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(Unknown Source)
    at java.io.BufferedInputStream.close(Unknown Source)
    at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
    at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
    at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
    at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
    Do i need to add something more .
    I am only allowed to use the below:as its the corporate policy for now.
    Java Plug-in 1.6.0_05
    Using JRE version 1.6.0_05 Java HotSpot(TM) Client VM
    Can someone please help me how to get the pack200 work in the Object tag ?
    Please advise.
    Thanks,

    InputStream in = sc.getResourceAsStream("application.jar.pack.gz");
            OutputStream out = response.getOutputStream();
            if (in != null) {
                try {
                    sendOut(in,out);
                } catch (IOException ioe) {
                    if (ioe.getMessage().compareTo("Broken pipe") == 0) {
                        sc.log("Broken Pipe while writing");
                        return;
                    } else  throw ioe;
            } else response.sendError(response.SC_NOT_FOUND);
    private void sendOut(InputStream in, OutputStream ostream)
                     throws IOException {
            byte buf[] = new byte[8192];
    System.out.println("send jar file");
            int n = in.read(buf);
            while (n > 0 ) {System.out.println(n);
                ostream.write(buf,0,n);
                n = in.read(buf);
            ostream.close();
            in.close();
        }the servlet code is above
    u should conifgure the servlet in the web.xml for urlmapping *.jar
    <servlet-mapping>
          <servlet-name>jarService</servlet-name>
          <url-pattern>*.jar</url-pattern>
        </servlet-mapping>where jarService is the name of the pack200 sevice servlet ContentType.java
    Edited by: kartheepanmirra on Jun 17, 2009 12:17 AM
    Edited by: kartheepanmirra on Jun 17, 2009 3:06 AM

  • How to load an Applet application for 1000cards?

    Hi Friends..
    I want to know How to load an Applet application for 1000cards?..
    Assume that, i have an Applet application that need to loaded into 1000cards..
    So, how to solve this?
    Do i must to load an application manually for each card?
    Is there any another way?
    Thanks in advance..

    for 1000 cards you can use a "small" printer like an evolis "dualis" or something like that
    we've produced thousands of cards with this method in my company.
    the pro is that you can also print the cards in the same time.
    they usually have simple APIS like get_new_card_from_loader(), put_card_on_contacts(), eject_card()
    you can connect any reader on the printer , the raw card contacts are available on a connector.
    some printers also have contactless couplers.
    but remember that deploying cards in the field is not just loading an applet.
    it's also a cryptographic challenge, you need to change the card keys or anyone will be able to play with your cards, adding and removing applets as they want.
    typically this is achieved by using an ultra secret mother key and whatever derivation algorithm you like using data from INIT UPDATE as diversifier. example, you can TDES cipher part of the INIT UPDATE data using the mother key as TDES key, or use something involving SHA1, using a HSM if you are serious, etc.
    for your entertainment here is a high volume card personnalization machine. That's amazing.
    http://www.youtube.com/watch?v=6ZBF_yKRF5w

Maybe you are looking for

  • Valores de PIS e Cofins calculados no Faturamento que não vão para a J1B3n

    Olá pessoal, Gostaria de pedir uma ajuda a vocês. Estou em um cliente que está com o cálculo correto dos valores de PIS e Cofins no faturamento (VF03), porém estes valores não vão para a J1B3n nas Notas Fiscais de saída (venda), no entanto, os valore

  • Certain ondemand channels via Vision box using up ...

    His anyone else experienced this possible flaw with the ondemand service on the BT Vision system. I have found that programs watched via iplayer and any channel4 related content seem to deduct usage from my monthly broadband allowance. I have only re

  • BPEL Console - Fault Policy

    Hi, Can we use BPEL Console/Admin to edit fault policy file? I didn't find a way though.. I assume it should be possible using Console/Admin ... Please let me know .. Ranjith

  • Handoff is not working on 5s and 101

    I checked my settings for couple of times so I am sure they are fine. But handoff is still not working despite I can pick up the call on my mac and use the instant hotspot.

  • Unable to type Hebrew characters intoTextInput control

    Hi All, I've created a project using Flash Builder beta 2 and SDK 4.0. When testing my project locally I'm able to type Hebrew characters into TextInput fields. In a strange way, after uploading release build to website I'm not able to type Hebrew an