Error in running java card project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajujrk
    New Member
    • Aug 2008
    • 107

    Error in running java card project

    I have created a new java card project and added new applet file to it, but when I try to run the project it shows below error:

    Code:
    java/lang/NoClassDefFoundError: java/lang/String
    My Code is

    Code:
    package smartapplet;
    
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    import javacard.framework.ISOException;
    
    public class SmartApplet extends Applet {
    
    private SmartApplet () {
    }
    
    public static void install(byte bArray[], short bOffset, byte bLength)
            throws ISOException {
        new SmartApplet().register();
    }
    
    public void process(APDU arg0) throws ISOException {
        // TODO Auto-generated method stub
    
    }
    
    }
    Please Help

    Thanks
    Raju
    Attached Files
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    The String class, is part of the java.lang package; however, you have neglected to import this package.

    Checkout this tutorial about Using Package Members for more information about import.

    -Frinny

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      rajujrk :

      In the posted code, at what point/line did the error occur?

      As I pointed out in another thread, because many of us do this part time from secured computers, your attachments are not available and the amount of time for reading and troubleshooting code is very limited.

      You might receive much more help if their content is extracted and the text posted and properly formatted and the basic troubleshooting steps have been performed.
      (^_^)

      Comment

      Working...