Package concept?

Hi,
I am confusing how to understand the term "package" in javacard.
Is it similar concept in java? example, java.lang, java.io, ... are packages?
if they are packages then do they have AIDs ?
my own thought, the concept of package in javacard is not the same as in normal java. Package must have AID, and two different packages must have two different AID. Two same "package name, example java.lang", might belong to different packages.
thanks,
Hoang Long
Edited by: CardM on Jul 11, 2011 2:24 AM

safarmer wrote:
Hi,
You must start from the bottom up dependency wise. You can not have packages that have circular references. I have commented on this recently but it is to do with CAP file load order on the card.
You can convert packages with sub packages but each package is converted individually regardless of if they are nested.
Cheers,
ShaneIn short, if i have 2 java packages: java.A and java.A.B
There is no circular references. java.A uses classes in java.A.B. Am i able to convert java.A to CAP file without pre-converting java.A.B?
(I am using converter companion with java card dev kit 2.2)
ps: is there any conversion issue if i have deeper level of inheritance?
thanks for your help,
Hoang Long

Similar Messages

  • Java package concept in ABAP Objects

    Hi, just a question on grouping of classes in ABAP Objects.
    In Java, you can group classes by "package" to avoid
    namespace collision, my question, in ABAP Objects, how
    do you group classes to avoid namespace collision?
    I know that there is package concept in SAP/ABAP but it
    is different concept in Java.
    Thanks in advanced for your reply.

    Hello One and Lonley,
    the package concept in ABAP and Java is quite different. In java the package name is part of the development object in ABAP not. So any class pool name is global unique. In combination with the restriction on 30 chars this leads often to somehow cryptic names.
    The only way to escape this somehow is the excessive use of local classes. That mean classes defined within main programs. If you are on 7.00 you may check FuGr SAPLSAUNIT_TREE_CTRL_LISTENER for this technique.
    Best Regards
      klaus

  • Best Practice: Usage of the ABAP Packages Concept?

    Hi SDN folks,
      I've just started on a new project - I have significant ABAP development experience (15 years+) - but one thing that I have never seen used correctly is the Package concept in ABAP - for any of the projects that I have worked on.
    I would like to define some best practices - about when we should create packages - and about how they should be structured.
    My understanding of the package concept is that they allow you to bundle all of the related objects of a piece of development work together. In previous projects - and almost every project I have ever worked on - we just have packages ZBASIS, ZMM, ZSD, ZFI and so on. But this to me is a very crude usage of packages, and really it seems that we have not moved on passed the 4.6 usage of the old development class concept - and it means that packages do not really add much value.
    I read in the SAP PRESS Next Generation ABAP book (Thomas Ljung, Rich Hellman) (I only have the 1st edition) - that we should use packages for defining separation of concern for an application. So it seems there they are recommending that for each and every application we write - we define at the least 3 packages - one for Model, one for Controller and one for view based objects. It occurs to me that following this approach will lead to a tremendous number of packages over the life cycle of an implementation, which could potentially lead to confusion - and so also add little value. Is this really the best practice approach? Has anyone tried this approach across a full blown implementation?
    As we are starting a new implementation - we will be running with 7 EHP2 and I would really like to get the most out of the functionality that is provided. I wonder what others have for experience in the definition of packages.
    One possible usage occurs to me that you could define the packages as a mirror image of the application business object class hierarchy (see below). But perhaps this is overcomplicating their usage - and would lead to issues later in terms of transportation conflicts etc.:
                                          ZSD
                                            |
                    ZSOrder    ZDelivery   ZBillingDoc
    Does anyone have any good recommendations for the usage of the ABAP Package concept - from real life project experience?
    All contributions are most welcome - although please refrain from sending links on how to create packages in SE80
    Kind Regards,
    Julian

    Hi Julian,
    I have struggled with the same questions you are addressing. On a previous project we tried to model based on packages, but during the course of the project we encountered some problems that grew overtime. The main problems were:
    1. It is hard to enforce rules on package assignments
    2. With multiple developers on the project and limited time we didn't have time to review package assignment
    3. Devopelers would click away warnings that an object was already part of another project and just continue
    4. After go-live the maintenance partner didn't care.
    So, my experience is is that it is a nice feature, but only from a high level design point of view. In real life it will get messy and above all, it doesn't add much value to the development. On my neew assignment we are just working with packages based on functional area and that works just fine.
    Roy

  • Package Concept is in Forms ???

    Hi all ..
    Can anyone tell me whether Package concepts is in oracle forms ...
    Regards
    Sai

    we cannot save two form modules with same name in same folder but we can have in different folder
    Right !!! but does system allows you to open both these forms at one time. Do windows allo you to open another file with same name from different folder when same file name is open ??????????????.
    If you need to open these forms at run-time, then you need to specify pathname while calling the form. But only current form will be in active state.
    If your application is a menu driven, and you are calling forms only with names, and not sure where the form lies, then add a suitable paths to registry.
    Eg.. Forms60_path=c:\forms;c:\forms1; .......
    Cheers........... Bob

  • Returnable transport packaging concept.

    Dear Experts,
    Please help me to understand Returnable transport packaging concept. what are the pre requisites involved like material master data. & regarding traceability of the material.

    Hi all SAP GURUS,
    we have 1 special requirement involving of Capital Tools/Equipments( Capital Asset  ), which we need to send to different sites thru ordinary truck wherever it requires and once the work is complete at site then 2 possibilities
    1)  If there is no further demand on tools then again we will take back of tools from site to our plant
    or
    2)  If any demand further for tools then  we need to send these tools from that site itself to another site where it requires.(i.e means not taking back the tools from the site to our plant.)
    Note : In some cases some of tools not further required then some we will take back to our plant and some are again sent to another site where ever it trequires
    Requirements to be fulfilled are:
    Till we didnt created any Material masters for this so suggest the best possible method to follow in order to suit the above requirement considering the below constraints.
    1) Tracking of Capital Tools at every point of time
    2) Considering the Excise and Taxes involved in the above process at different poins of time
    3) Documents which are required to prepare as per all Laws.

  • Package concepts

    Hi,
    What is Forward Declaration in Packages means?Also one more question .Suppose i have declared 5 functions/Procedures in Package Specification but in Package Body i am giving body(Definition) to only 3 of them .will it throw some error on Compiling.Please explain the concept.Thanks

    user12920808 wrote:
    What is Forward Declaration in Packages means?How about reading docs? Forward Declaration
    Suppose i have declared 5 functions/Procedures in Package Specification but in Package Body i am giving body(Definition) to only 3 of them . will it throw some error on Compiling. Please explain the concept.Every procedure/function declared in package specification is publc and anyone who has execute privilege on that package can call that procedure/function. So it is obvious procedure/function must be defined in package body. At the same time package body can define procedure/function that is not in package specification. Such procedure/function is private and can't be called from out side.
    SY.

  • Clear me about package concept?

    While executing packages at first time the entire package loaded into memory then 2nd time execution it will executed from local memory.
    if in case any update happened in any schema object then how the execution happened?
    its from server or local memory?

    The package is cached in shared memory on the server, not local memory on your desktop. The state of package variables is also held in the private memory area associated with each session that is using it (e.g. if you set somepackage.var := 3, that is held in your session's private memory and nobody else can see it).
    If the package is invalidated by changes to underlying objects, the cached version is also invalidated and must be reloaded by the next session to use it.

  • Error regarding package concept and classpath

    Dear All,
    I am just compiling two java classes which is part of struts frame work.
    Register Form.java:
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername(){return username;}
    public String getPassword1(){return password1;}
    public String getPassword2(){return password2;}
    public void setUsername(String username){this.username=username;}
    public void setPassword1(String password){this.password1=password;}
    public void setPassword2(String password){this.password2=password;}
    I am compiling this file its compiling and i put this class file in app folder and the i am compiling the second java file.
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    when i am compiling i got error as
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    C:\j2sdk1.4.1_04\bin>javac RegisterAction.java
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    ^
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    no problem in struts jar and servlet jar file i set classpath correctly for this but i cant resolve thsi error.
    can any one help on this issue.
    i need urgently.
    Thanks
    Balaji.A.U.

    i need urgently.Oh. In that case, I'm probably too late. What a bummer.

  • Packaging concept for GUI and Background, using SwingWorker

    How to set up the following structure, in order to meet the requirements of SwingWorker (doInBackground, publish, process):
    1. There is a class SGui - contained in a package of Swing GUI methods SGui, located in package ...sgui - which will
    - start a background thread, by using SwingWorker, which does some complex logics (the methods from class SSolv, see item 2)
    - it passes initial data to that background process, which have been entered into the GUI
    - displays the intermediate results from the background threat
    2. There is another class SSolv, in package ...ssolv, which contains some complex logics, and should deliver intermediate results to be displayed by the GUI
    From all the information from tutorial etc., I put up a structure like this, for SSolv:
    package ...ssolv;
    class SSolv {
    void senderMethod {
    publish (ComData...)   // should transfer the data to the EDT
    : class ComData {
    //  ... puts up the objects for transferring the data to the GUI, by method publish
    }All the rest of Swing methods goes to package SGui.
    This stub already shows the issue, which comes from structuring the application in two (or even more) packages : compiling package SSolv produces the error publish(V...)
    has protected access in javax.swing.SwingWorker ! I understand that this protected method could only be used in this context, after instancing a subclass of SwingWorker,
    - however I thought it would most senseful to get the "sender" (+publish+), and the "contents" (+ComData+) to the package, where the data will be produced.
    This is evidently in contradiction to the requirement, that publish - as a protected method of SwingWorker - should be defined in the SGui class, as it has to apply the (overriden) methods process (including get), done etc.
    With my application, the SGui class will be compiled later ! So I had to reference a method from SGui that is not known during compiling of SSolv !
    Unfortunately, all the examples shown in the tutorials (as far as I can already know them...) only use one package; so all the classes are compiled from one file, and they will not get this dilemma.
    Please give me some idea, how I will have to restructure / workaround / use advanced methods, to solve this ?
    Edited by: GW.G on 16.07.2010 17:27

    Bad news: I did some homework, but I didn't get it working...
    One reason may be, that your demo doesn't cover my reqs. exactly, regarding implementation of MySwingWorker, because my SSolv - which does all the processing - has to be in the doInBackground() method, and the 'senderMethod' (called dumpExFlags in my SSolv.java) is running integrated from within, because the application SSolv decides, when we have data ready for publishing. See code below...
    Secondly, I really did not get the point with your design, especially with the following segment from MySwingWorker, regarding the use of the private objects sgui and ssolv, and the mechanism of the constructor ?
    import yr2010.m07.d.ssolv.ComData;
    import yr2010.m07.d.ssolv.SSolv;
    public class MySwingWorker extends SwingWorker<Void, ComData> {
       private SGui sgui;
       private SSolv ssolv = new SSolv(this);
       public MySwingWorker(SGui sgui) {
          this.sgui = sgui;
       @Override
       protected Void doInBackground() throws Exception {
          ssolv.senderMethod();
          return null;
       }{code}
    By the way, I analysed the java files with PMD, and didn't find any relevant
    hints why things should not work like that.
    Another tricky detail: the compiler (as well as PMD) reports, that method 'publish' does not 'override', except calling the super method, but your example works !?
    Finally, to my knowledge any type that is overriden, should have his own @Override 'tag'. So did you purposefully omit that in your design ?
    Worst of all, I just ran into the problem that the compiler will not
    recognize all the the variables and methods I imported to the
    DoSolver(SwingWorker subclass). (This may be an issue from my 'bottom
    up' design of my 1000 lines of this first Java example I produced), but:
    I don't see why, in this case, javac ignores all the imports from other
    packages, and reports 'cannot find symbol' on ANYTHING ... ? This puts my debugging efforts on the major problem to halt ...
    {code}
    package s3forum.sgui;
    import javax.swing.;
    import java.util.;
    import s3forum.ssolv.SSolv;
    import s3forum.ssolv.ComData;
    import s3forum.sgui.SGui;
    public class DoSolver extends SwingWorker< Void, ComData > { // SSolv definiert Datenformat
      // DoSolver() - shouldn't be necessary. implicitly defined by instancing with
      // DoSolver dSol = new DoSolver() - should get the overriden methods ready for use
    // ========== Background process, will start when instancing DoSolver
    @Override
    protected Void doInBackground() {
      SSolv slv=new SSolv(vArr); // Instance of solver. vArr=start-values from SGui
    return null;
    //============ Gets data from SSolv coninuously
    @Override
    public void process (java.util.List cDList) {
      if (cDList.size() > 1) { //### Prelim: ignore multiple datasets!
        System.out.println(" ### Multiple values !! ### ");
      ComData cD = cDList.get( cDList.size()-1 );
      dispMLabel (cD.getX, cD.getY, cD.getD);
      if (cD.getIS) {
        dispMText (cD.getX, cD.getY, cD.getD);
    } //Process
    //=========== Postprocessing after SSolver finishes
    @Override
    public void done() {
         // Message
      dispGuiMsg ("Solver ist beendet. FERTIG dr&uuml;cken zum Beenden >");
        // modify button, forcing System.exit()
      fertigB.setActionCommand("fertigWaitEnd");
      fertigB.setEnabled(true);
    //=================== publish, should override method from SwingWorker
    @Override
    public void publish( ComData cd ) {
      super.publish(cd);
    } // Class DoSolver
    {code}
    Could you please further comment on this ? Thank you !
    Edited by: GW.G on 20.07.2010 12:46
    Edited by: GW.G on 20.07.2010 12:48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Global Package Check Switch and Package Attributes

    Hi everyone,
    I would like to know where can I display/change the Global Package Check Switch of a system in release ECC 6.0? I know it can be set to "Pure Package Concept" for example.
    I've looked into the SAP on-line documentation and the system customizing (SPRO) but without luck. Can anyone guide me?
    I am also looking for the Package attributes. In Package Builder (SE21) there is suppose to be a way to set a package to "Package Check as Server". I saw in the SAP on-line documentation that there is a "Attributes" tab but I cannot find it. Does someone know where I could find such attributes?
    Thank you in advance for your help.
    Regards,
    Sylvain

    Netweaver 7.0 EHP 1 Trial, same question: Paketprüfung als Server/Client checkboxes don't show up in package builder properties:
    »ABAP Objects« (Keller/Köhler) S.69 Abb.2.13 shows checkboxes to turn on package checks / Paketprüfung als Server / Client, yet no obvious way to make these checkboxes appear.
    This question has not been answered, don't know why it is »Assumed Answered«.

  • Cannot extend package in ABAP 7.1 (new installation)

    Hi everybody,
    sorry for this question, but how can i extend a package in ABAP 7.1. I have created a structure package (ZSP_Test). In this package i try to create a program but without success. I get the message: Cannot extend package ZSP_TEST.
    My Package Properties:
    - allow adding new objects: (is disabled, read only)
    - Type of Package: Package
    - superpackage:
    - Encapsulation level: Not encapsulated
    - Alias for enhancement:
    - Dependency Control list: Checked
    - Allow Enhancement: Checked
    regards,
    Sid
    Edited by: Sid on Nov 6, 2009 6:01 PM

    Sid,
    congratulations you are on 7.1 - I am not yet. As far as I understand the package concept, you must have everything in the package interface, what you want to use but do not define in the package.
    Look at any existing standard packages: Probably they have something very basic in the interface that will allow you to create a program and use some basic statements.
    At least thats what I exspect to be the reason for your error.
    Regards,
    Clemens

  • Idoc packaging for Receiver Idoc adapter in 7.11

    We are using PI 7.11. And, I have a File to Idoc scenario. I am trying to find an Idoc packaging option for Receiver Idoc adapter. Any suggestions on how to do configure thi scenario?
    Thanks
    abhinaya4321
    Edited by: abhinaya4321 on Dec 3, 2011 12:15 PM

    hi,
    We are using PI 7.11. And, I have a File to Idoc scenario. I am trying to find an Idoc packaging option for Receiver Idoc adapter. Any suggestions on how to do configure ?
    that is possible with message packaging concept it is suitable for you requirement
    go through below links:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b54994-f569-2a10-ad8f-cf5c68a9447c.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b54994-f569-2a10-ad8f-cf5c68a9447c?QuickLink=index&overridelayout=true
    thanks,

  • How to use package in PL/SQL

    HI,
    How to create a pachake in PL/SQL.
    how can we atore the sql files in a package.
    expalin about the package concept in PL/SQL

    Here's the docs:
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10807/toc.htm

  • I have some problems with keyword "package"...

    I am studing Java, and studing package now. I created 2 files to try the package concept, but I met some runtime errors, although I don't think that it has anything wrong. Does anyone can pointed out where is wrong in my code?
    //============== file 1: Mainfun.java which is at com/dancefires/c05/q2/ directory =========
    package com.dancefires.c05.q2;
    public class Mainfun{
         //friendly function
         void state(){
              System.out.println("This the Mainfunction");
         public static void main(String[] args){
              System.out.println("Main function begin:");
              Subfun sf = new Subfun();
              sf.state();
    //========= File 2: Subfun.java at the same directory ========
    package com.dancefires.c05.q2;
    public class Subfun{
         //friendly function
         void state(){
              System.out.println("This is Subfun.");
         public static void main(String[] args){
              Mainfun mf = new Mainfun();
              mf.state();
    If i run any of them, I will get the error strings:
    Exception in thread "main" java.lang.NoClassDefFoundError: Mainfun (wrong name:
    com/dancefires/c05/q2/Mainfun)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    If I remove the first line, which is "package com.dancefires.c05.q2", the 2 file will run well. But why I can't use package to state that they are in the same package? or I have something wrong with these 2 program?

    I found what is the problem. There is nothing wrong with my code, but something wrong with my way of running command of "java".
    I run it in command line by command "java" as:
    java Mainfun
    and
    java Subfun
    This is ok for class file without package statement. But if I put keyword "package" at the top of the file, I must run it change its way. I should run it as:
    java com.dancefires.c05.q2.Mainfun
    and
    java com.dancefires.c05.q2.Subfun
    and I found that I can run these classes at any where no matter which directory my current directory is.
    Thanks for everyone.

  • Package: EXIITS project and Objects packages are difference.

    Hi Guru,
    I have created a Project for exit and stored the same in one package. My doubt is wil this exit will  be effect for objects in other package.
    I beleieve this is not possible as packages are differenct.
    Kindly correct me if my understading is wrong and also take me how to make the Exit effective for this other objects too (Object in different package.)
    Many thanks
    Anuj.

    Did you read about the package concept? This would be quite easy to verify by yourself with a little test, so what is the problem?
    Thomas

Maybe you are looking for

  • New iPod touch stopped working (recovery mode)

    Hi! I bought a 8 GB iPod Touch 2 weeks ago. It worked fine until today. I left US yesterday and arrived in Europe today. After the flight I tried to switch on my iPod and its started in recovery mode. iTunes said I need to restore and upgrade the iPo

  • The power button does not work

    i recently noticed that my original iphone power button does not work i push but nothing happens. I know that i have to fix but the problems is that the warranty is been over for long i need to know a good place to repair because the apple people sai

  • What battery do I need for this please?

      Model Name:          MacBook   Model Identifier:          MacBook2,1   Processor Name:          Intel Core 2 Duo   Processor Speed:          2 GHz   Number Of Processors:          1   Total Number Of Cores:          2   L2 Cache:          4 MB   Me

  • In month mode, my calendar marks yesterday as "today"

    In month mode, my calendar marks yesterday as "today"; if I switch to "day" and back, it corrects itself. The systems seems to have the correct date and time.  Any suggestions for correcting this? I am using Outlook on my PC to sync with the iPad and

  • Adobe Premiere Pro CS5 5.5.2 update now available

    The Adobe Premiere Pro CS5 5.5.2 update brings Mercury Playback Engine support for NVIDIA 'Maximus' configurations, where a Tesla card can work alongside a Quadro card for increased GPU processing power. The update also fixes issues which prevent the