First class object in java

What is a First class object in java?

1. Shatabdi is a train that runs in India.
2. First class is the only way to travel in indian
trains. second snd third class, while cheap, means
you ride in very uncomfortable conditions.
3. paan is also known as betel nut. It is a bitter
nut and green leaf that is chewed as some people find
it refreshing. What results is copious amounts of
saliva that is red. To get rid of the saliva, chewers
of paan spit resulting in red stains wherever that
saliva happens to land. It is a common site to see
paan being sold on the railway platform by vendors and
the attendant red stains on the walls at the ends of
said platforms. Utterly gross.
As for me being Indian? hmmm.....either that or yo be havin a lot of free time at your job at sisal plantation in deepest India.
that way you get to travel a lot, mix with the people, get your impressions ....
|:-)

Similar Messages

  • RFE for makeing Java Generics first class objects.

    If this is a duplicate, please let me know:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255821
    Please vote for it if you are so inclined. I bet we can push it to the #1 RFE. :-)
    --Kevin                                                                                                                                                                                                                                                                                                                                                                                                           

    p.s. I thought my name was much snappier. It
    probably would have gotten a lot more votes too. ;-)Fortunately, your synopsis will remain in the database
    and point to the original reification RFE.

  • LOADJAVA이용시 JAVA CLASS OBJECT의 권한 문제

    제품 : SQL*NET
    작성날짜 : 2004-01-14
    LOADJAVA이용시 JAVA CLASS OBJECT의 권한 문제
    ====================================
    PURPOSE
    Java Stored Procedure를 이용하기 위해 java class를 DB로 load할 때 loadjava를
    이용할 수 있다. 이때 loadjava 수행시 권한 오류나, java stored procedure(JSP)의
    owner와 다른 owner로 java class를 load하고 JSP에서 사용하는 경우의 권한
    부여 방법 등을 확인해 본다.
    Explanation & Example
    1. loadjava와 dropjava의 간단한 실행 방법 및 관계된 objects들
    loadjava command는 가장 간단하게 다음과 같이 지정할 수 있다.
    -r option은 db에 load하고서 load된 java object를 compile하는 것이다.
    os> loadjava -user scott/tiger -r LJTeset.class
    이 문장을 수행하고 나면 다음과 같은 object가 생성된다.
    즉, load되는 java class외에도 2개의 테이블과 2개의 index, 그리고 한개의
    table이 생성된다.
    loadjava를 수행하는 user는 이러한 object를 생성할 수 있는 권한이 있어야한다.
    SQL> select object_name, object_type from user_objects;
    OBJECT_NAME OBJECT_TYPE
    CREATE$JAVA$LOB$TABLE TABLE
    LJTest JAVA CLASS
    JAVA$CLASS$MD5$TABLE TABLE
    SYS_C002172 INDEX
    SYS_C002173 INDEX
    SYS_LOB0000029869C00002$$ LOB
    loadjava후, 다시 dropjava문장을 다음과 같이 수행하는 경우, 이렇게 생성된
    6개의 object가 모두 사라지는 것이 아니고 LJTest만 지워지고 나머지는
    모두 그래도 남는다.
    os>dropjava -user scott/tiger LJTest.class
    즉, 일단 한번 loadjava를 수행하면 위에서 LJTest를 제외한 나머지 object는
    항상 존재하게 된다.
    2. loadjava시 다른 user가 java class이용할 수 있도록 하는 방법
    loadjava시 load된 java class를 이용하여 JSP를 생성한 owner에게 다음과 같은
    방법으로 권한을 부여할 수 있다.
    os>loadjava -user scott/tiger -g public -s -r LJTest.class
    os>loadjava -user scott/tiger -g eykim -s -r LJTest.class
    이때 -g option이 권한을 부여하기 위한 option이며, -s를 지정하면 동일한
    이름의 public synonym이 만들어져서 이 java class를 다른 schema에서도
    이용가능하게 된다.
    (NOTE) 이때, named PL/SQL에서 role을 통해 부여 받은 권한은 인식하지
    못하는 제약사항이 loadjava시에도 그대로 적용된다.
    즉, -g다음에 role명을 주는 경우 그 role을 가지고 있는 다른 user가
    해당 java class를 이용하여 JSP를 만드는 경우 해당 java class를
    인식하지 못하게 된다.
    loadjava외에 직접적으로 SQL문장을 통해 권한을 부여하여도 된다.
    SQL>grant execute on "LJTest" to scott;
    여기서 주의할 점은 반드시 LJTest java class를 지정할 때 큰 따옴표(" ")를
    표시하여야만 인식이 된다.
    이것은 grant뿐 아니고 sql문장에서 java class를 reference할 때 항상 적용된다.
    예를 들어 resolve시에 다음과 같이 하여야 한다.
    SQL>alter java class "DBTrigger" resolve;
    위의 loadjava 문장에서 -s option을 통해 public synonym을 생성하였는데,
    이것은 sql문장을 통해 synonym을 생성하여도 같은 결과이다.
    이때, user는 create public synonym권한을 가지고 있어야 한다.
    이후 dropjava 수행이 필요한 경우, dropjava시 -s option없이 public synonym도
    함께 drop되므로 drop public synonym도 필요하다.
    Reference Documents
    <Note:106753.1> ORA-29521 in Java Stored Procedure referencing Loaded Javax Classes
    Java Stored Procedures Developer's Guide Release 2 (8.1.6)", (A81358-01)

  • Delete Class Objects and methods

    Hi, i have created a class file for a game. Now i have 3 to 4
    games in one Main File. So after playing one game user can choose
    another. Now can anybody tell me how to delete the first class
    Object or methods, which was used in First game. So that i can
    remove the garbage collections from Flash to make it with fast
    process?

    A short simple (overly simple) explanation is that objects are like little machines, which operate independantly from other objects (other little machines). You design an application as a collection of these little machine/objects, interacting with each other. Then you drill down another layer of detail, and design the machines themselves. You do this by defining the classes, which are like blueprints to make a little machine/object.
    In java, this is largely expressed by the interface definition at the higher level, and the class definition at the lower level. The interfaces say how various objects may talk to each other, and the class definitions say how any individual object may talk at all.
    This is a very basic description, and in fact isn't entirely accurate; if they want to lots of people on this forum could pick it apart. But hopefully it gets the idea across. (As my language design prof said, quoting somebody else, "teaching is just a series of lies.")
    There are resources on the web about object-oriented programming, object-oriented design, etc. mutmansky's right, a college course is best, but you can still learn a lot from docs on the web.

  • How can i have a refrence of a java class object instance in my c++ project

    Hi!
    How can i have a refrence of a java class object instance in my c++ project. Is there a way?

    hahaxia wrote:
    The second question is the big one. The first question is half of the problem of "c++ to java" invocation and access. But the other half which is "java to c++ " invocation and access is still not solved. jni only provide the "java to c++ " DLL invocation Wrong,
    Using JNI your java classes can have methods implemented in C/C++.
    Using JNI you can call java classes.
    There is no other possible interaction between C++ and java, so it does it all.

  • Is a jclass object always a java.lang.Class object?

    In a native method, I'm receiving a jobjectArray called "args" as a parameter. I'm writing this:
    jclass cls1 = env->GetObjectClass(args);
    jmethodID mid1 = env->GetMethodID(cls1, "isArray", "()Z");
    but this returns 0, indicating there is no isArray in the jclass returned by GetObjectClass. On the other hand, this works:
    jclass cls2 = env->GetObjectClass(env->GetObjectClass(args));
    jmethodID mid2 = env->GetMethodID(cls2, "isArray", "()Z");
    Why??
    When I call getMethods() (via JNI) on cls1, I get only the methods of java.lang.Object. When I do that on cls2 I get the methods of java.lang.Class.

    Oops, I answered my own question. The jclass object represents the class of args, so its methods are those of the class of args, not those of java.lang.Class. I was misinterpreting what GetMethodID does -- it gets methods that would be returned by getMethods() in the Class object, not the methods of the Class object.

  • How to pass a "object" as a prameter from one java class to another java

    hi experts, I want to know "How to pass and get object as a parameter from one java class to another java class". I tried follwoing code just check it and give suggetions..
    import Budget.src.qrybean;
    public class ConfirmBillPDF extends HttpServlet
    qrybean db = new qrybean();
    SimplePDFTable pdfTable = new SimplePDFTable();
    pdfTable.simplePDFTableShow("2010","2011","1","2","1","131","102");
    }Here i want to pass db with simplePDFTableShow method. simplePDFTableShow is in another java class. So how can i do this.
    And also i want to know, how this obj will get.
    please help me.
    Edited by: andy_surya on Jul 14, 2010 7:51 AM

    Hi andy_surya
    what is this i am not understand
    pdfTable.simplePDFTableShow("2010","2011","1","2","1","131","102");but i am try to solve your problem try this
    qrybean db = new qrybean();
    SimplePDFTable pdfTable = new SimplePDFTable();
    pdfTable.simplePDFTableShow(db);and access like this in SimplePDFtable class update your method
    simplePDFTable(qrybean tempDB)
    // write your code
    }

  • How to reload class file for java objects in CF MX7

    I'm trying to create a simple java object for use in a CFML
    page. According to the topic "About ColdFusion and Java objects" in
    the CF developer's guide, I can compile my java module and put the
    .class file in the CFusionMX7/wwwroot/WEB-INF/classes directory and
    it'll be dynamically reloaded any time CF sees a new .class file
    there. But the dynamic reload isn't happening; I have to restart
    the CF server to get it to pick up a new version.
    I don't believe this directory is in the "general JVM
    classpath"; I don't find "classes" in the Java Class Path in the CF
    Administrator's System Information page. And I have all the caching
    options turned off on the "Server Settings > Caching" page, if
    that has any bearing on it.
    Are there any known issues around this dynamic reload
    capability, or maybe a more definitive way to make sure the
    WEB-INF/classes directory isn't in the classpath?
    Thanks,
    James

    Yes, I understand. But if I'm reading it correctly, what
    you're saying seems to contradict the documentation
    http://livedocs.adobe.com/coldfusion/7/htmldocs/00001561.htm
    ColdFusion dynamically loads classes that are either .class
    files in the web_root/WEB-INF/classes directory or in JAR files in
    the web_root/WEB-INF/lib directory. ColdFusion checks the time
    stamp on the file when it creates an object that is defined in
    either directory, even when the class is already in memory. If the
    file that contains the class is newer than the class in memory,
    ColdFusion loads the class from that directory.
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18228&sliceId=1
    Dynamic class reloading for Java servlets classes and
    forcfobject (sic) Java classes is disabled by default in
    ColdFusion MX. To enable dynamic class reloading, do the following:
    Also, I seem to recall that setting worked in a prior
    version. Though I would have to test it again on another machine to
    be certain.

  • Problem with Dynamically accessing EJB Class objects in WL 7.0 SP1

    I am trying to build a component which has the ability to instantiate and execute
    an known EJB method on the fly.
    I have managed to build the component but when I try and execute it I get a ClassNotFoundException.
    I know that the EJB I am trying to invoke is deployed and available on the server,
    as I can see it in the console, I also seen to have been able to get the remote
    interface of the object, my problem occurs when I try and access the class object
    so I can perform a create on the object and then execute my method
    The code I have written is below:
    private Object getRemoteObject(Context pCtx, String pJNDIName, String pHomeBean)
    throws Exception {
         String homeCreate = "create";
         Class []homeCreateParam = { };
         Object []homeCreateParamValues = {};           
    try {  
    //This call seems to work and doesn't throw an exception     
    Object home = pCtx.lookup(pJNDIName);
    //However this call throws a java.lang.ClassNotFoundException
    Class homeBean = Class.forName(pHomeBean);
    Method homeCreateMethod = homeBean.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    } catch (NamingException ne) {             
    logStandardErrorMessage("The client was unable to lookup the EJBHome.
    Please make sure ");
    logStandardErrorMessage("that you have deployed the ejb with the JNDI
    name "+pJNDIName+" on the WebLogic server ");
    throw ne;
    } catch (Exception e) {
    logStandardErrorMessage(e.toString());
    throw e;     
    Any advice would be really appreciated, I'm fast running out of ideas, I suspect
    it has something to do with the class loader but I'm not sure how to resolve it
    Regards
    Jo Corless

    Hello Joanne,
    Congratulations! I'm very happy that you've managed to fix your problem. It's
    always essential to understand how to package applications when deploying on BEA
    WebLogic. Usually, by throwing everything into an EAR file solves just about all
    the class loader problems. :-) Let us know if you have any further problems that
    we can assist you with.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Joanne Corless" <[email protected]> wrote:
    >
    >
    I've fixed it!!!!!!!!
    Thanks to everyone who gave me help!!!!
    The class loader was the culprit which is what I suspected all along.
    As soon
    as I put the 2 jar files I was using into an EAR file the problem went
    away!!!!!
    Thanks again
    Jo Corless
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Joanne,
    As Mr. Woollen mentioned, I also believe it's a problem with the class
    loader.
    You need to be careful how you arrange your EJBs, because WebLogic has
    a specific
    method in which it loads classes in an EAR, JAR, and WAR file(s). Please
    refer
    to http://dev2dev.bea.com/articles/musser.jsp for more information about
    BEA WebLogic
    class loading mechanisms and caveats. Also, try printing out the various
    methods
    that are available on the object that was returned to you via reflection.
    For
    example, use the getMethods() method, which returns an array of Method
    objects
    that you can subsequently cycle through and print out the various method
    names.
    This way you can discover if the class found/returned to you is indeed
    the one
    you intend to locate.
    Hope this helps,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Rob Woollen <[email protected]> wrote:
    I believe the issue is the home interface class for this EJB is not
    available in the class loader which is doing the reflection.
    If you do:
    getClass().getClassLoader().loadClass(homeInterfaceClassName)
    I suspect it will fail. Reflection still requires that the class be
    loadable.
    -- Rob
    Joanne Corless wrote:
    Hi Slava,
    If I make my code look like you describe below I get a compliationerror telling
    me that
    home.getMethod() is not recognised (no such method)
    If I change it slightly and use
    Method homeCreateMethod =
    home.getClass().getMethod(homeCreate,homeCreateParam);
    The code will compile OK but when executed it still throws a NoSuchMethodException
    Any ideas ?
    Thanks for your help so far
    Regards
    Jo Corless
    Your code should look like
    Object home = pCtx.lookup(pJNDIName);
    Method homeCreateMethod =
    home.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    Regards,
    Slava Imeshev
    "Joanne Corless" <[email protected]> wrote in message
    news:[email protected]...
    Hi Ryan,
    I also wanted to mention that if you do a "header search" in this
    particular
    newsgroup
    with the search query as "reflection", you will see many previousmessages
    regarding
    reflection and EJBs. I believe you could learn a lot from thedifficulties
    that
    others have faced and solved.I tried that and although there was a number of similar cases noneof them
    actually
    seem to fix my issue. Thanks for the suggestion though
    Are the EJBs that you are trying to access accessible via your
    system
    classpath?
    Try to avoid having them accessible via the main system classpath,and
    only bundle
    them in your appropriate EJB jar files (contained in an EAR file,for
    example).Maybe I should have laid the problem out a little clearer.
    I have a number of EJB's bundled up in a JAR file which is hot deployedto
    the
    server. Within this first JAR file is an EJB (SSB) component that
    needs
    to
    be
    able to invoke a known method on another EJB. This second EJB may
    or
    may
    not be
    within the first JAR file but it also will be hot deployed.
    The component trying to invoke the method on the 2nd EJB has to
    be
    able to
    create
    an instance of the 2nd EJB without actually knowing anything bar
    a
    JNDI
    Name which
    is passed in at runtime.
    I can get as far as doing the
    Object home = pCtx.lookup(pJNDIName);
    This returned a class with the name
    "com.csc.edc.projects.allders.httppostoffice.postman.PostmanBean_mp8qy2_Home
    Impl_WLStub"
    My problem seems to occur when I try and invoke the create method
    Method homeCreate = home.getClass().getMethod("create", new Class[0]);
    My code throws a java.lang.NoSuchMethodException at this point so
    I
    am
    unable
    to progress to the next step of :
    Object bean = homeCreate.invoke(home, null);
    So I can return the instantiated bean back to the calling client.
    Why am I getting the NoSuchMethodException, is is because I am gettinga
    stub
    back rather than the home interface and if so how do I get the truehome
    interface
    from the bean
    Thanks in advance
    Jo Corless

  • Issues in mapping objects from java to flex - using flex4

    Hi,
    I have a class in java which i want to send to flex4 using BlazeDS as middleware. There are a few issues that i am facing and they are:
    When sending the object across (java to flex), the properties with boolean data type having value as true gets converted to properties with value as  false. Even after setting the value to true it still comes as false on flex side. Can't understand why this is happening.
    When sending the list of object containing property with boolean data type, the object on flex side does not show those properties at all. As of there were no boolean properties in that object.
    Last but not the least, When sending List<ContractFilterVO> contractFilterVOs to flex using remote call, the result typecasted to ArrayCollection does not show the holding objects as ContractFilterVOs but as plain default Object though having all the properties send, except the boolean one mentioned in above points. Basically it is not able to typecast the objects in arraycoolection but the same objects gets typecasted when sent individually.
    In all the above points i am using Remote Service through BlazeDS for connectivity with Java. I have done a lot of this stuff in Flex 3 but doing it for the first time in flex 4, is there anything that Flex 4 needs specific. Below is the pasted code for reference purpose.
    Flex Object
    package com.vo
         [RemoteClass(alias="com.vo.ContractFilterVO")]
    public class ContractFilterVO{
         public function ContractFilterVO(){
         public var contractCode:String;
         public var contractDescription:String;
         public var isIndexation:Boolean;
         public var isAdditional:Boolean;
    * Rmote Part of code
    var remoteObject:RemoteObject = new RemoteObject();
    remoteObject.destination="testService";
    remoteObject.addEventListener(ResultEvent.Result,handleResult);
    public function handleResult(event:ResultEvent):void{
         var contarctFilterVOs:ArrayCollection = event.result as ArrayCollection; //Point 2&3 probelem, if list sent form java
         var contarctFilterVO:ContractFilterVO= event.result as ContractFilterVO; //Point 1 probelem, if only single Object of type ContractFilterVO sent form java
    Java Object
    package com.vo
    public class ContractFilterVO implements Serializable 
         public function ContractFilterVO(){
         private static final long serialVersionUID = 8067201720546217193L;
         private String contractCode;
         private String contractDescription;
         private Boolean isIndexation;
         private Boolean isAdditional;
    I don't understand what is wron in my code on either side, it looks syntactically right. It would be great anyone could help me point out my mistake here. Waiting for right solutions...
    Thanks and Regards,
    Jigar

    Hi Jeffery,
    Thanks for your reply, it did solve my query @ point 3 as well as point 2 where the objects in arraycollection were not geting converted and boolean properties did not appear when list of an objects were received. And hey, i did have public functions for properties defined java class, just forgot to mention here in post, sorry for that.
    The solution you gave was right, but than what if i have a VO which has multiple List of objects coming from Java, than i would have to create an instance of each type of object on flex side this is too tedious, is'nt it? Is there any better solution... out there.
    And jeffery do you some tricks up your sleeve for this Boolean issues to that i am facing in point 1... Still struggling with this one...
    Anyone out there would be more than welcome to point my mistake, if any and provide tips/tricks or solutions...
    Thanks again to Jeffery...
    Waiting for more solutions sooner...
    thanks and Regards,
    Jigar

  • Class object

    Hi,
    I have a question about the class Class. Assume that I have written a program containing 3 classes (say 1.java, 2.java, 3.java). Now, when the program is compiled, we get 3 classes namely 1.class, 2.class and 3.class. Are these the classes that actually contain the meta-data needed when a new object of that class is created OR are there going to be 3 other classes that is loaded by JVM when these classes are loaded, and that contain info abt these classes?
    Thanks for the help in advance.
    Aravind

    Well, first off 1.java, 2.java, 3.java won't compile... ;->
    Anyway, yes, the .class files contain all the information necessary to construct instances of a class and to define its fields, constructors, methods, etc. The instance of Class associated with the particular Java class derived from the contents of the .class file.
    Chuck

  • Adding inner class object

    Hello to all
    I have one doubt regarding eventhandling. Consider i am having one class named outer which extends applet and with in outer class i am having one class inner which extends panel.
    Now when i try to add the inner class object in action performed of outer
    class it doesnt get added. How to overcome this.
    Eventhough sometimes it gets added it shouldnot appear for the first time. After resizing the window only it gets displayed.
    How to over come this.
    This is my coding
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JApplet implements ActionListener{
         JButton b1;
         Container c;
         public void init()
              c=getContentPane();
              b1=new JButton("First");
              c.add(b1,BorderLayout.NORTH);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              System.out.println("Working");
              c.add(new panel());
         class panel extends JPanel
              int a=5;
              JLabel l=new JLabel("ADSF");
              public panel()
                   add(new JButton("ASDFASDFs"));
                   add(l);
              /*public void paint(Graphics g)
                   g.drawString("ASDFASDF123123123123",20,20);
    }

    You could try being more specific when you add ie
    c.add(new panel(), BorderLayout.CENTER);

  • About Class Object  as Array

    Hello.. I'm beginner in Java Programming
    Now i learn about Array.. i'm not understand about use class object become array. for example i'm create class object Card.
    Then i call Card object to CardTest as main object and Card object called as array.
    can you tell me about how to work Card object as array in CardTest ?
    Edited by: 994075 on Mar 14, 2013 11:55 PM

    994075 wrote:
    yup..thanks guru :DI'm no guru, I just bought a decent Java book 10 years ago and here I am.
    so i guess Object Class can be array :).I don't get that statement. You can store objects in an array, if that's what you mean. An array itself is also an object.
    but i'm not understrand if static method in Card object can be called automatically when Card initialized in CardTest?a) research constructors
    b) you usually don't need static methods, its just something that people new to the language tend to overuse because then you don't have to create object instances. Forget about static methods, try to make it work using regular non-static methods.
    And you really should read and study more, you're coming to the forum way too soon. First get a solid knowledge base, the only thing you're doing now is asking questions that you could have answered for yourself by studying more.

  • Pointer to class object ?

    Is it possible to reference to a class object by an integer or string value ? I'm writing a scripting language, and for that I would like
    to be able to do something similair to this:
    Player p1 = new Player();
    int ref = (int) p1;
    Player p2 = (Player) ref;Where the outcome should be that p2.equals(p1).
    I've searched for this, but I got the feeling it is not possible. I did read something about hashCodes, is that something to look into ?
    Alternatively, I could give every Player an integer field called 'id', and then iterate through all Players to find the one with the given id, but I was
    wondering if there would be a more 'direct' approach.

    Great! A HashMap was exactly what I needed. I've now built it in, and it works like a charm.
    Encephalopathic wrote:What do you want to do with this information?The scripting language I'm writing is intended to be used by beginners in programming, for creating games.
    The language has objects, and for simplicity, I made all object fields and all variables in the language are doubles.
    After doing that, I'm not not sure if that was a good decision, but since it's allready implemented that way I don't want to change it anymore.
    In more advanced situations, people might want some object to refer to another object.
    For instance, if a group of a certain type is chasing a group of another type, and I the first group needs to split up. Then every individual from the first group needs a pointer to a member of the second group, so they each chase their own individual target.
    The language runs from a Java applet. I have an example game here:
    http://members.home.nl/bramdenhond/abcbasic/games/asteroids.html
    The explaination is in Dutch, but the idea of the game is to use the mouse to control the spaceship and shoot all asteroids without colliding with them.
    Thanks a lot for pointing me towards the HashMap! It was really helpful.
    For future reference, I'll place the code I used here:
        HashMap referencetable = new HashMap();
        int uniqueplayerid;
        //create
        Player p = new Player();
        referencetable.put(new Integer(uniqueplayerid), p);
        uniqueplayerid ++;
        //remove
        referencetable.remove(new Integer((int) indexedplayers[p].objvars[0]));
        //obtain
        int id = 12;
        TPlayer newp = (TPlayer) referencetable.get(new Integer(id));

  • Will 2D objects in java.awt.geom.* be Serializable in next version of Java?

    I am pretty frustrated about having to write my own Serializable classes. I'm not sure if this is the right place to ask, but will the next version of Java supports Serializable 2D objects?
    Further, I was trying to write my own class to extend java.awt.geom.GeneralPath to become Serializable, but it's declared "final". What should I do? (I had no problems with Rectangle2D.Double, Line2D.Double, etc.)
    Any help is greatly appreciated.
    Selwyn

    Your code for serializing the state of the General path forgets two things:
    1. the winding rule
    2. the segments types!
    You could use a vector, but I just directly wrote to the file:
    private void writeObject(ObjectOutputStream oos) throws IOException
    {     out.defaultWriteObject();
         //write state of transient GeneralPath _gp;
         out.writeInt(_gp.getWindingRule());
         float[] coord = new float[6];
         PathIterator i = _gp.getPathIterator(null);
         while(!i.isDone())
         {     int seg = i.currentSegment(coords);
              writeInt(seg);
              //switch on seg, writing correct # of floats from coords
              i.next();
         out.writeInt(-1);     //sentinel for end-of-data: SEG_LINETO etc are [0,4]
    private void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
    {     in.defaultReadObject();
         int rule = in.readInt();
         _gp = new GeneralPath(rule);
         //etc...
    }3. I'm just winging this code -- haven't tested it
    --Nax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for