Sax and pre1.4 applets

hello,
i would like to make my applet as compatible as possible. i tried to avoid swing and other newer classes, but i need to parse a xml file and the org.sax.* classes are 1.4-only. is there a way to ship them with the applet? i dl and unziped the jar file from the sax projects website, but i'm not sure what to do with it.
thanks in advance
aquarius

You can specify more than 1 JAR in the archive tag of your Applet. This should solve your problem.
archive="MyJar.jar, sax.jar"

Similar Messages

  • "Right" way to mix SAX and DOM in app

    I'm writing a standalone desktop application that reads and stores data as XML files. Eventually, it might be converted to use some web services, but it's not a priority right now.
    What I need to do is to use an XML file, which could be large, as kind of a database -- there are many entries, each with a unique identifier, and the application will query the file to find those it needs to match and returns those as objects I'm mapping.
    At the moment, because this is a personal project and I'm using it to learn more technologies, I'm trying to (somewhat artificially) restrict myself to the pure Sun APIs. So far, my investigations have pointed to JAXP (by including Java EE 5 libraries) with StAX (including JAX-WS). Which raises two questions:
    1) To do this "right", do I really need to bundle my app with the entire JaveEE+Metro stack?
    2) Is there a better solution than StAX that's fully Java 5 compliant, even if it means stepping out of the Sun box? I haven't found many references to other solutions that are more recent than 2004. Is parsing XML on an app that has nothing to do with an appserver that uncommon?

    More likely than not, I won't be abstracting to that degree. If the current structure isn't right, I'd update the app instead of storing that kind of information in more files.
    I imagine at this point an example would be more effective. The app is itself more of an inventory browser that can jump around different searches dynamically. As an illustration, imagine that it's an inventory for DVDs. One central file will be your collection (with each entry containing a movie ID, date of purchase, etc). Another file would be more static, a list of DVDs themselves. These entries would contain information about the package itself -- how many discs? What's the title of the package? Which special features does it have? It would also point to an entry in yet another file which would have information about the film, containing biographies of the people listed under the movie credits.
    Basically, I want a flatfile database that I can do joins on that are split up into different files. There are few files (here, one) that will be constantly updated by the user. The others could be modified if needed, but it's not going to be optimized for it. (For example, you could own a DVD that nobody's ever heard of, and put in the info yourself.) Periodically, one or more of the more static files is updated and will be downloaded into the app.
    One of the advantages I see for this is that, in the future, I could with few changes turn this into more of a web service. Instead of pushing changes in those few files, the app would look to a web service for the data it would now find in files on the user's hard drive. But for now, it also has to be one standalone package.
    To answer the question, the file that will most commonly be updated by the user is the one that I don't have problems loading into memory in full. It's the other data that it links to which I want to be able to search and load into objects dynamically. My current implementation is to run the file through SAX and grab the data as it sees it, but it's really ugly. That could very well be how I'm using it and not because I'm trying to shoehorn some functionality into a technique it doesn't fit, but I'd like to find that out. ;)

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Finding and retrieving an XML file from an application and an applet

    I have a problem.
    I have data stored in an XML file. I want to be able to call that file and store it into a document object from an application standing alone on a computer as weel as from an applet that would be running over the web.
    I don't know how to do this.
    When I use a relative path name for the application it attaches the path of the folder that contains java.exe. I could do something with the class path but this wouldn't help the end user of the application on a different computer. For similar reasons I don't want to hard code because I don't know where the final applet will be stored.
    I have a table that holds, sorts and filters the data so I want the table to collect the data, I don't want to dictate the path from the applet or the application, I want a method that is consistant with both scenarios.
    Can anyone offer some advice?

    I've just finished trying it out, here is what I did:
    String xmlDocName="filename.xml";
    java.net.URL fileURL=this.getClass().getResource(xmlDocName);
    private final String fileName = fileURL.toString().substring(6);
    The substring removes the "file:/" from the URL.
    This works fine in the IDE, I have even stored the xml file in a lower folder e.g. package_folder/xml_folder/filename.xml and replaced the xmlDocName with "xml_folder/filename.xml" and it worked fine.
    I haven't tried it in an applet because I'm running IE and as you are well aware there are problems with swing and IE applets. But you answer deserves the Duke Dollars, thank you very much.

  • (Solved) obmenu and blueman-applet won't start

    Hi,
    after update the obmenu and blueman-applet won't start. googleing arround only says the the problem is fixed.
    obmenu:
    Traceback (most recent call last):
      File "/usr/bin/obmenu", line 21, in <module>
        import obxml, gtk, gtk.glade, gobject, random, time, os, sys
    ImportError: No module named obxml
    blueman-applet
    Traceback (most recent call last):
      File "/usr/bin/blueman-applet", line 40, in <module>
        from blueman.Constants import *
    ImportError: No module named blueman.Constants
    Last edited by LRRR (2010-10-13 17:25:27)

    based on your informations( which is lacking) i'm guessing that you are using testing, mostly because only from there you can get "after updates".
    if this indeed is the case, be sure you have community-testing enabled too

  • What're the differences between JSP, Java Script, and Java Applet?

    I am confused by the concepts: JSP (Java Server Page), Java Script, and Java Applet? What are their main differences?

    I don't know about differences, but one of their main similarities is that each of them has a page in Wikipedia.
    JSP
    JavaScript
    [Java applet|http://en.wikipedia.org/wiki/Java_applet]
    There. That should give you enough information.

  • How do you highlight iHelp Buttons and List Applet fields

    How do you highlight iHelp Buttons and List Applet fields? I've followed all the steps in the Bookshelf but it seems like buttons and list applet fields do not highlight. The highlight feature only seems to work in form applets. Is this a known issue? Are there workarounds for this?
    Thanks
    Bernhard
    Edited by: Bernhard on Dec 12, 2011 2:06 PM

    Bernhard
    I remember that colors of single list applet fields cannot be changed, since the whole list is regarded as one "control" itself. It works for single fields in form applets (as you said) but not in list applets. There is a document in MyOracleSupport pointing this out, but at the moment I can't find it.
    Regarding iHelp Buttons I have no idea.

  • CFGRID and CFTREE applets not working

    Problem I can't figure out: On my production machine
    ColdFusion outputs an OBJECT tag for a CFGRID or CFTREE generated
    applet and everything works fine. On my dev machine (same OS
    (Windows 2003, patch level, CF 5 service pack, same code) for some
    reason ColdFusion outputs an EMBED tag for the CFGRID or CFTREE
    generated applet ... and the applet doesn't work or show up. I
    applied all patches and fixes for CF 5. I'm using XP and IE 6
    against these two systems. It has to be a ColdFusion or server
    setting somewhere. I've tried it on a number of machines and the
    Java VM version of the requesting machine doesn't seem to matter.
    Thanks!

    Hi,
    May be this
    thread
    will help you to fix your problem.

  • Greek lettets and java applet???

    Hello,
    I'm using Linux and i have a problem with the greek letters on the java applets on web pages....
    instead of greek letters i see little squares...
    i don't have much experience nor with linux neither with java.........
    (Sorry for my bad english)
    can u help me please?

    Are you using a browser on the Linux box and it can not display the Greek letters in the applets?
    Or is the Linux box running a servlet engine and is there a problem with the HTML pages and the applets coming from it?
    Edited by: BIJ001 on Sep 27, 2007 10:43 AM

  • Is it possible to LOAD and INSTALL applet during pre-personalization?

    Hi Friends..
    Currently, i use JCOP card
    I want to know the other way to LOAD and INSTALL applet not through CardManager..
    I mean, is it possible to LOAD and INSTALL applet during pre-personalization time?.
    Thanks in advance

    Hi,
    i want to LOAD and INSTALL Applets while pre-personalization phase..
    No, i don't want to defer the LOAD and INSTALL..In the past, we have used the pre-personalisation phase to load KDC keys onto a card and remove the ISK and set issuer specific identifiers (IIN and CIN) etc. You could also load your applet at this time if you wish. You can also load the applets at personalisation.
    How do you plan on doing the personalisation phase? If you were to use a GP scripting environment for example, the CAP files are embedded as a part of the install scripts and only loaded onto a card when you begin executing your personalisation scripts. Since I assume you will be using the small desktop printers mentioned in a different thread, you may be better off integrating the applet loading into your personalisation code (printer integration) so you do not need to double handle cards.
    Actually, is it possible to LOAD and INSTALL applet if we don't authenticate to the CardManager?..There are ways to load and install an applet without explicitly calling INIT UPDATE and EXTERNAL AUTH, but you still need to be authenticated to the card manager, otherwise anyone could manage card content. You can use install tokens and delegated management (which are all outlined in the GO Card Spec).
    Cheers,
    Shane

  • SetStartDate() and setEndDate() applet methods not working

    I am Using setStartDate() and setEndDate() applet methods to set Start and End Date of my XACUTE output. But its not working.
    document.<appletname>.getQueryObject().setStartDate(<Start Date>);
    document.<appletname>.getQueryObject().setEndDate(<End Date >);
    This is the part of the code i am using.

    Hi,
    It seems you are trying with proper format following things i can suggest.
    Check date time format which you are passing should be correct.
    also you can try setParam(SD,StartDate) and setParam(ED,EndDate)
    hope it helps!!
    Regards,
    Manoj Bilthare

  • Error when Load and Install Applet on physical Card

    Hi all,
    when I load and install Applet on physical Card, i making an error:
    SELECT
    -> 00 A4 04 00 07 A0 00 00 00 18 43 4D
    [ERROR  ] <- 6E 00
    Message: Authentification Fails
    Can anyone help me?
    Thanks!

    are you sure your card is a java card ?

  • Access Terminal and select applet

    Hi people,
    I have a question about to run the aplet in a javacard. Is there any code or other useful material about getting terminal and select applet and run the methods of the apllet in a programmable manner? Thanks for your interest...
    Edited by: POLAT on Mar 16, 2009 7:41 PM

    Honestly I haven't figured out how to pass a pin when selecting the applet, however at the minute I have a way around it:
    you will see in teh code below, I have hardcoded a default pin and I have a pin update method that can be called via a apdu,
    NOTE this example works with the code above:
    *Applet ID 41 63 63 6F 75 6E 74 41 70 70 6C
    public class AccountApplet extends Applet {
         final static byte ACCOUNT_CLA = (byte)0xB0;
         final static byte VERIFY = (byte) 0x20;
         final static byte CREDIT = (byte) 0x30;
         final static byte DEBIT = (byte) 0x40;
         final static byte GET_BALANCE = (byte) 0x50;
         final static byte UPDATE_PIN = (byte) 0x60;
         final static short MAX_BALANCE = 10000;
         final static byte MAX_TRANSACTION_AMOUNT = 100;
         final static byte PIN_TRY_LIMIT =(byte)0x03;
         final static byte MAX_PIN_SIZE =(byte)0x08;
         // Applet-specific status words:
         OwnerPIN pin;
         short balance = 109; // Starting balance of decimal 109 is 6D in hex
         public static void install(byte[] bArray, short bOffset, byte bLength) {
                        new AccountApplet(bArray, (short) (bOffset + 1), bArray[bOffset]);
         private AccountApplet(byte[] bArray, short bOffset, byte bLength){
              pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
              // bArray contains the default PIN initialization value (12345)
              bArray[0] = 01;
              bArray[1] = 02;
              bArray[2] = 03;
              bArray[3] = 04;
              bArray[4] = 05;
              bOffset = 0;
              bLength = 5;
              pin.update(bArray, bOffset, bLength);
              register();
         public boolean select() {
         if (pin.getTriesRemaining() == 0)
                   return false;
              return true;
    public void deselect() {
         pin.reset();
         public void process(APDU apdu) {
    byte[] buffer = apdu.getBuffer();
              if (selectingApplet())
                   return;
              if (buffer[ISO7816.OFFSET_CLA] != ACCOUNT_CLA)
                   ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
              switch (buffer[ISO7816.OFFSET_INS]) {
              case GET_BALANCE:          getBalance(apdu);      return;
              case DEBIT:                    debit(apdu);             return;
              case CREDIT:               credit(apdu);           return;
              case VERIFY:               verify(apdu);          return;
              case UPDATE_PIN:          updatePin(apdu);     return;
              default:                    ISOException.throwIt
              (ISO7816.SW_INS_NOT_SUPPORTED);
    private void credit(APDU apdu) {
              if (!pin.isValidated())
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
         byte numBytes = buffer[ISO7816.OFFSET_LC];
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              if (( numBytes != 1 ) || (byteRead != 1))
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
              byte creditAmount = buffer[ISO7816.OFFSET_CDATA];
              if (( creditAmount > MAX_TRANSACTION_AMOUNT)
                        || ( creditAmount < 0 ))
                   ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
              if ((short)( balance + creditAmount)  > MAX_BALANCE)
                   ISOException.throwIt(SW_EXCEED_MAXIMUM_BALANCE);
              balance = (short)(balance + creditAmount);
              return;
         private void updatePin(APDU apdu) {
              if (! pin.isValidated())
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
              byte numBytes = buffer[ISO7816.OFFSET_LC];
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
                   if (byteRead != numBytes) {
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
                   if ( numBytes > 8 )
                   ISOException.throwIt(SW_PIN_TO_LONG);
              if ( numBytes < 4 )
                   ISOException.throwIt(SW_PIN_TO_SHORT);     
              short offset_cdata = 05;          
              pin.update(buffer, offset_cdata, numBytes);
              pin.resetAndUnblock();
         private void debit(APDU apdu) {
              if (! pin.isValidated())
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
              byte numBytes = (byte)(buffer[ISO7816.OFFSET_LC]);
         byte byteRead = (byte)(apdu.setIncomingAndReceive());
              if (( numBytes != 1 ) || (byteRead != 1))
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
         byte debitAmount = buffer[ISO7816.OFFSET_CDATA];
              if (( debitAmount > MAX_TRANSACTION_AMOUNT)
                        ||  ( debitAmount < 0 ))
                   ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
              if ((short)( balance - debitAmount ) < (short)0)
                   ISOException.throwIt(SW_NEGATIVE_BALANCE);
              balance = (short) (balance - debitAmount);
         }      private void getBalance(APDU apdu) {
              byte[] buffer = apdu.getBuffer();
              short le = apdu.setOutgoing();
              apdu.setOutgoingLength((byte)2);
         Util.setShort(buffer, (short)0, balance);
              apdu.sendBytes((short)0, (short)2);
          * verification method to verify the PIN
         private void verify(APDU apdu) {
              byte[] buffer = apdu.getBuffer();
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              if (pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead)
                        == false)
                   ISOException.throwIt(SW_VERIFICATION_FAILED);
         } // end of verify method
    } // end of class Account

  • Differences between Java Web Start and HTML-Applets???

    Hi,
    I'm trying to get information about the differences between JWS-Applets and 'normal' HTML-embedded Applets.
    Is it possible to develop both simultaneously in one project???
    Is there a Programming-documentation that describes the differences between JWS and HTML-Applets???
    Thanx!
    Rembrand

    Check out the link shown below:
    http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html
    All you need really is to create a JNLP file to launch your applet/application.
    ;o)
    V.V.

  • XML - 0112 Error on parsing using SAX and xml file in InputSource object.

    I need to parse a XML string and extract some information. I have to use SAX parser. I'm converting hte string to InputSource and then trying to parese.
    i'm getting XML-0112 error, my guess is that it is not able to locate DTD file but i tried hardcoding the whole path in DOCTYPE tag.
    i tried doing setSystemId also but no luck.
    null

    Can you post a simple test case to look at?

Maybe you are looking for

  • All third party software no longer works

    I've been trying to open Microsoft Word, Seashore, and so on today, and for some reason none of them will open anymore, whereas all of my first party software is fine as usual. The only thing I think it could be is that I ran the program that deleted

  • Export and import between different versions

    Hi everyone, I have some databases in Oracle 7.2, and others in 9i Release 2. Sometimes we have to do exports and imports between them, and I want to know if running the catexp.sql or the catext7.sql file also applies to 9iR2 version. Thanks in advan

  • Search Help Within Search help

    Hi experts!! How can i assign a search help to a field of another elementary search help from SE11??? I tried to create a new data element but did not work...

  • PO-release Stratergy

    Guru, I did the PO -Release stratergy set up, 1. Created Character for Document type in CT04 2. Assign the character to CL02 3. Set the release group and Code in IMG All the Set up did an it was working in Devlopment client then Moved to Quality Clie

  • How to update an ios 4.2.1

    can someone help with the update of an ipod ios 4.2.1