Firewall - Java Card project with two packages.

My Java Card project has got two Java Card packages. One of them contains only the Java Card applet. The other package contains all other classes. We did the splitting because our application is large and if all the code is left inside the one package if debug mode was checked, the size of the cap file was more than 64 bytes and the CAP file with that size cannot be installed inside the simulator. That situation made the programming difficult. Therefore the splitting took place. What is my question? If we have two packages, is there a firewall between them or the packages are in the same group context.

A library package has different restrictions to an applet package. As for the firewall, the data created in your library package is owned by the applet instance that created it. That means any data or objects created by calling your library from your applet will be in the same context as your applet. Any other applet accessing this library will not be able to access instances from the original context. This is only a problem with static fields and methods etc that are shared between both applets.
Cheers,
Shane

Similar Messages

  • 4.7 actionscript project with two .as files

    hi,
    Using FB 4.7 to make actionscript project with two .as file: Main.as and GFX.as. There are variable in GFX that Main cannot access. WHat do I need to do to the GFX.as file to make the variables it declares readable by Main.as?
    Thanks
    GReg

    Reason 1:
    put public before var . Example: public var foo:Number
    Reason 2:
    the variable that you can't load in Main.as should be inside function GFX() body. Example:
    package {
         import flash.display.MovieClip
         public class GFX
              public function GFX()
                   public var foo:Number  // Put your variables here that can be load by another class
              function anotherFunction(parameters:Number) // Another function starts here
                   foo = parameters
    Reason 3:
    In Main.as, put import GFX after package {

  • Java Card simulator with MD5 MessageDigest support?

    Are there any Java Card simulators with support for the MD5 MessageDigest available? I checked both cref and jcwde, but they only support ALG_SHA.

    Thanks.
    By the way, do you happen to know if the newer JCOP cards (e.g. the NXP (Philips) JCOP 41 V2.2.1/72K USB
    NXP (Philips) JCOP 41 V2.2.1/72K) still support the MD5 MessageDigest? Older JCOP cards seem to support MD5, but at least in the publicly available JCOP 41 specs there is no mention of MD5 anymore; e.g. at http://www.bsi.bund.de/zertifiz/zert/reporte/0426b.pdf

  • Java Card compatibility with readers... (please help me!!)

    Hi,
    I would like to know how to determine the compatibility of a existing reader with the JavaCard technology.
    I have studied the standar ISO 7816 and I'm not sure if a reader must be compliant with absolutely all
    parts of the standar (Part 1,2,3,4,5,6) to be capable of read, write Java Cards and select the applet to
    execute.
    Especifically I need to know if the readers GEMPC410 and CASTLES EZ200 are able to read, write
    and execute multiple java applications.
    The specifications that a read, said that GEMPC410 can read and write ISO7816 1/2/3/4 and
    CASTLES EZ200 can read and write ISO7816 1/2/3 but i have the following doubt:
    These readers should be compatible with the part 4 and/or 5 of the ISO standar to
    interchange commands with the reader (Part 4) and identifie the applications to execute (Part 5)?.
    Where I can find more information about this issues?
    Thank you very much for your soon answer.

    Well,
    There are two type of readers you can use with JavaCards:
    Contact readers
    As specified in ISO7816, for the contact readers working with T=0 and T=1 protocols. On win machines they are normally supported with the PC/SC interface, most of the readers are able to talk to that interface. In other words - if you can use any card on ur comp and if it is win platform JC will work fine.
    Contactless readers
    As specified in ISO14443, this babies are talking T=CL protocol. For now I know only JCOP30 products that are operating also in contactless mode. For this you will have to acquire some contactless reader and they are commong with drivers for standalone apps or for the PC/SC IF.
    But chance that you will use the second option in next 3 years is rather small.

  • How do I test a Java card applet with different AIDs on the fly?

    ... Like sweeping cards from employees in a queue of people lining up in the morning?
    When I created my applet, the aid is a fixed value inside the class.
    Whenever I wanted to test it with another value, I changed that AID and rerun the applet.
    I find it very cumbersome that needs to be rerun and rerun, over and over again.
    How do I test the applet easily with any values of AIDs that I'd like to put in, on the fly.
    I know I can't simulate the sweeps of card in the applet because I can't have a main method with a signature
    of Strings[] args or String[] args. I can only have JUnit to help me out, but still java card doesn't allow either
    main(Strings[] args) or TestCase to inherit from.
    Thanks
    Jack

    your question is hard to understand but:
    an applet always has one definite AID and you cant change it after install as far as i know
    a) you want to test many cards with diffrent AIDs?
    ->send a list of select commands and check the return values
    b)you want one card with the same applet to be available for many AIDs?
    ->install many dummy applets forwarding the commands to one core applet
    c)i think i didnt get your point :/

  • How do I communicate a Java Card applet with a server?

    I'm new to Java and Java Card and currently developing a smart card system. I'm not sure what to use on my applet or server, JCSystem or SecureConnection or something else?
    If I'm writing a server application, then how do I install it so that I can simulate it with cjre?
    Thanks in advance.
    p/s: Connection is using TSL.

    The flow is like this:
    Java Card --> POS terminal -> Server
    Yes. I'm using JC3.
    Here's what I've achieved so far using SocketConnection
    SocketConnection sc = (SocketConnection) Connector.open("socket://localhost:50007");
    InputStream is = sc.openInputStream();
    OutputStream os = sc.openOutputStream();
    os.write("Hello world!".getBytes());
    is.read(buffer);
    os.close();
    is.close();
    sc.close(); Edited by: andirady on Dec 4, 2012 11:59 PM

  • Create one project with two images- DUHHH

    Sorry I am struggling with the learning curve.
    I want to simply create a high quality print with two photos arranged using the Book's cool sample templates.
    I have arranged the images within a Book template.
    It only takes one page and Book must be an even number of pages. How can I export the one page- or what other element of Aperture should I be using?

    Hi,
    yes, I think to remember that there is support for a single style only. If you need another one too then you create a new project.
    Frank

  • Java Card ECKey with NIST P256 Curve. How to encode a negative coefficient?

    I try to use an ECKey (http://www.win.tue.nl/pinpasjc/docs/apis/jc222/javacard/security/ECKey.html) with the P-256 curve defined by NIST on a Java Card:
    Curve P-256
    p = 115792089210356248762697446949407573530086143415290314195533631308867097853951
    r = 115792089210356248762697446949407573529996955224135760342422259061068512044369
    s = c49d3608 86e70493 6a6678e1 139d26b7 819f7e90
    c = 7efba166 2985be94 03cb055c 75d4f7e0 ce8d84a9 c5114abc af317768 0104fa0d
    b = 5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b
    Gx = 6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296
    Gy = 4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5
    with y²= x³ -3x + b (mod p)
    As far as I understand it I use
    p for setFieldFP(), prime p corresponding to the field GF(p)
    r for setR(), order of the fixed point G of the curve,
    b for setB(), second coefficient of the curve,
    Gx and Gy for setG(), fixed point of the curve (after encoding them as ANSI X9.62),
    cofactor of the order of the fixed point G is 1, so setK(1)
    The coefficient A is -3 (according to the definition of the curve). But how do I have to encode -3 (as a byte[]), so that I can set it with setA()?

    Refer to page 33 in this document: http://www.nsa.gov/ia/_files/nist-routines.pdf
    Use the hex values. You don't have to calculate any parameters yourself.
    Regards,
    Adriaan

  • Command Line Compilation of  a Project with different packages

    Hi,
    I am trying to compile a project through command line, which has different packages with many classes in it. Now If I try to compile package by package It's complaining about other referenced classes of different packages. So I created .bat file, which includes all the packages, but it's complaining input line is too long.
    D:\jdk1.3.1\bin>app.bat
    My bat file is
    javac -d d:\Application\build d:\Application\source\com\ibc\rules\login\*.java d:\Application\source\com\ibc\rules\lookup\*.java .................d:\Application\source\com\ibc\wid\events\*.java d:\Application\source\com\ibc\wid\frames\cust\*.java ...
    and so on............
    Is there any solution for this problem?
    Thanks in advance....

    I think the prefered and more elegant way to compile project including packages should be writing makefiles including their compilation, installation, deploying - rules ..
    Make is really powerful, the maybe only weak-point is that there are some distribution of them, gnu-make, microsoft nmake .. which are slightly different, that made porting among platforms difficult.
    The jakarta-ant was a new approach to this which uses xml parser to proof the dependencies, etc ..
    Because I'm not familiar yet with xml & ant and as a in-blooded unix user, "make" is still my prefered way to do roject.
    The easiest way to get unix environment required for using make in Windows platforms is to download the "unxutils". It includes make, bzip2, diff, ... and other unix-tools. Refer to this (found from search by google) :
    http://www.weihenstephan.de/~syring/win32/
    http://www.weihenstephan.de/~syring/win32/UnxUtils.zip
    http://sourceforge.net/projects/unxutils/
    For more documentation on how to write makefile, use make -tool, see
    http://www.gnu.org/manual/
    http://www.gnu.org/manual/make-3.79.1/html_mono/make.html

  • Java Dictionary Project with Tables already Existing

    Hi@all,
    is there a possibility to define a Dictionary Project in Developer Studio with Database Tables already existing? I tried to rebuild them manually in a project though there is no import possibility.
    But it doesen't seem to work with the frameworks requiring Java Dictioniary such as CMPs and SQLJ
    Best
    Uwe

    I forgott to mention the AppServer: it is a WebAS with J2EE (4)
    Developer Studio 7.0.11
    WebAS 7.00

  • Question about redeploying a Project with multiple packages

     I know that if I make changes to a single package within a project in SSIS 2012 that the entire project must be re-deployed.  Also, I know that the project version is updated when it is re-deployed.   My question
    is about the packages in the re-deployed project that have not changed.  Does anything actually change in the unaffected packages when only a single package is modified?  Do the Identifiers for the all packages change or just the package
    (or packages) that have been modified?  I'd really like to hear from someone with actual experience with this issue.
    Harold Jackson

    Since you rebuild the version of the package gets incremented. No structural changes occur.
    Arthur
    MyBlog
    Twitter

  • One project with two different web services styles (JAX-RPC and JAX-WS)

    Hi theres,
    how come the same project doesn't support two different web services styles?
    First time I create a web service proxy using the wizard, the second step is to choose between JAX-RPC and JAX-WS. After that, this step is removed from the wizard and all subsquent web services are assumed to be the same style as the first one.
    Can someone explain me why?
    thanks in advance,
    Manuel Leiria

    Hi,
    yes, I think to remember that there is support for a single style only. If you need another one too then you create a new project.
    Frank

  • How to set "Output folder" and "Outputfolder URL" in Flasbuilder 4b1 for combined Java/Flex project with WTP?

    Hi,
    how can I set the "Output folder" and "Output folder URL" in Flasbuilder 4b1?
    In Flexbuilder 3 I can do this under Project Properties/"Flex Build Path" 
    Under "Flex Build Path" in F4b1 I can see the settings, but they are not editable.
    A message says "The output folder settings for server projects are on the Flex Server Property Page" but under "Flex Server" there is nothing (yet) I can change/set?!
    Is there a workaround?
    Thanks for any pointers!
    Martin Zach

    Yes I'm using Flash Builder b1, build 235740. But your settings panel looks different to mine (see attached).
    Just a thought. When you created the Flex project, did you choose a server technology at that point already? I just remember from Flex Builder 3 that if you didn't choose a server technology when you created the Flex project then it was a pain in the ** to add it later. It involved editing the .flexProperties file manually if I remember correctly.

  • How to create a vi project with two ao channel and multi ai channel by customer/producer mode

    I'm a ni elvis ii user.
    i want to create one vi which include 2 AO channel output FGEN and multi AI channel acquisition signal,
    and i wish use cunstomer/producer mode to realize this vi。
    here is the vi,run this vi seveal secends,then pop-up with “完成该操作内存不足”
    anyone can help me?
    thx
    Attachments:
    demo.vi ‏191 KB

    Hi steve ,
    Sorry to say that you cannot configure and acquire from AI channels on a   Device simultaineously from 2 seperate VI's.
    regards
    Dev

  • Is it possible to simulate whole java card application on simulator?

    Hello all,
    currently i dont have any real java card yet,not either reader . I already made a simple applet and check its working by CJCRE (net beans simulator), it is working fine,
    now i want to move to host application which will communicate with java card via card reader. Is this possible to simulate complete application ( host application + java card applets)?
    I want to check it out that:- which line of java program would be helpful to know that:-
    1-"how real host application will talk to reader"
    2- how it connect and disconnect the reader
    3- how it send apdu to java card by reader
    and much more.
    I am using netbeans 7.1 and it is using CJCRE as a simulator....

    you mean to say this
    http://askra.de/software/jcdocs/app-notes-2.2.2/apduio.html
    I am quite confused now, i read this but still can not imagine the concept ,
    an applet code is :-
    public class GetName extends Applet
         final static byte CLASS     = (byte) 0x80;  // Class of the APDU commands
         final static byte INS_READ  = (byte) 0x02;  // instruction for the READ APDU command
         final static byte INS_WRITE = (byte) 0x03;  // instruction for the READ APDU command
         final static byte INS_DY_CO = (byte) 0x04;  // instruction for the READ APDU command
         final static byte[] text    = {(byte) 'A', (byte) 'M', (byte) 'I', (byte) 'T'};
         public static byte[] holder;
         public static void install(byte[] bArray, short bOffset, byte bLength)
            new GetName();
        protected GetName()
            holder = new byte[5];// allocation of memory in runtime
            register();
        public void process(APDU apdu)
              if(selectingApplet())
                   return;
            byte[] cmd_apdu = apdu.getBuffer();         
             if (cmd_apdu[ISO7816.OFFSET_CLA] == CLASS)
                   switch(cmd_apdu[ISO7816.OFFSET_INS])
                        case INS_READ:  
                        if ((cmd_apdu[ISO7816.OFFSET_P1] != 0) || (cmd_apdu[ISO7816.OFFSET_P2] != 0))
                        ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
                        short le = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); 
                        short len_text = (short)text.length;                      
                        if (le != len_text)
                        ISOException.throwIt((short)(ISO7816.SW_CORRECT_LENGTH_00 + len_text)); 
                        apdu.setOutgoing();                      
                        apdu.setOutgoingLength((short)len_text);
                        apdu.sendBytesLong(text, (short)0, (short)len_text);
                        break;
                    // here we save data from apdu and will keep inside the data byte                   
                        case INS_WRITE:
                    short lc = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); 
                    Util.arrayCopy(cmd_apdu, (short) ((ISO7816.OFFSET_CDATA) & 0xff), holder, (short) 0, lc);
                        short len_holder_inside_write= (short) holder.length;
                       apdu.setOutgoing();
                    apdu.setOutgoingLength((short)len_holder_inside_write);
                    apdu.sendBytesLong(holder, (short) 0, (short) len_holder_inside_write);
                    break;
                    case INS_DY_CO:
                        short len_holder= (short) holder.length;
                    apdu.setOutgoing();
                    apdu.setOutgoingLength((short)len_holder);
                    apdu.sendBytesLong(holder, (short) 0, (short) len_holder);
                    break;
                        default : 
                        ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
             else
                    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }now i think i need to make a another java file which would contain a main class, Is this both file would be inside a single java card project. and how these both would be connect to each other.
    for manually run a applet- there were two steps 1-
    C:\java_card_kit-2_2\samples\src\demo>jcwde jcwde-getname.app
    Java Card 2.2 Workstation Development Environment (version 0.18).
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
    and in second terminal we wrote-
    C:\java_card_kit-2_2\samples\src\demo>apdutool -nobanner -noatr getname.scr > ge
    tname.scr.jcwde.out
    Here it is clear that, if i will use javacardio then no need to pass the apdu from a file .....but i am confuse about how it possible, ie. is both file lie in same project , because i m using simulator so i need to run these both file simoltaneously........give me some roughly steps to implement this.

Maybe you are looking for

  • Itunes won't install on my windows 7, 64 bit puter.

    itunes won't install on my windows 7, 64 bit puter. Repeated tries. It rolls back and cancels midstream.

  • Need info and opinions!

    Ok, I have to first say that I love 10.6.4, its a great OS. Now, that being said, I also find Ubuntu 10.04 to be very useful to me, my question to the community is this, should I continue to use Parallels or should I dual boot my MacBook? Parallels h

  • I have elements 7 for 6 months, can I upgrade to 8 at a lower cost??

    Would like to upgrade to Elements 8. Any type of discount .? Purchased and using 7 for 6 months Howard

  • To define a the menu-followup

    Is it possible, to define which menu-area (to be selected) is selected on start? I have one movie with „Play", „Select chapter" and „Credits", where „select chapter" is in the preview the selected one, I want just to be „start" as the initially selec

  • The Shuffle won't shuffle

    Does anyone else have a problem with the shuffle not shuffling. I understand how it is supposed to work eg moving the buttong from off to the right point, but this doesn't work.