Instantiating a class by file - possible?

Hi all!
Is it possible to instantiate a class similar to Class.forName() when I only have the .class file?
Any ideas?

take a look at the newInstance() method in Class:
"Creates a new instance of the class represented by this Class object. The class is instantiated as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized."
http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html#newInstance()

Similar Messages

  • Instantiating a class within itself ?!

    Hi guys,I just started playing around with Java, trying to understand the core base of this language.
    I have created a simple class and just-for-try I instantiated this class from inside itself.
    public class PrivAndPublic{
    PrivAndPublic o = new PrivAndPublic();
    }//end of class
    It doesn't give me any compiling error!
    Doesn't it sound strange?!
    I cannot understand how is it possible and it really seems a bug to me.
    Thanks for any help!

    What Darcia wrote make me suppose that a class is totally created with the first line of a java file (i.e. public class PrivAndPublic{ )and initialized by the constructor (which, if omitted, comes by default with no arguments)...after all this, the class can be instantiated many times I want from inside the class itself.
    (I was thinking the class needed to reach the matching close curly brace to be possible to instantiate it)
    But as phyzome said I have to be careful to do not make the object call the method which I put the object in, otherwise I will cause an infinite loop...as I did try ;)
    Thanx guys, see you.

  • Reg: help on instantiation of class in workflow task

    Hi Geeks,
               I am trying to use class for Purchase order though standard workflow is available with BO. As per the requirement the triggering event is same as in the standard workflow with BO. Once the workfow is triggered ,The data is pulled to class from BO and custom release step is defined for release in class .
                  I face problem with the instantiation of class in workflow task while passed the po value and defined binding for the same after  reading  the document posted by jocelyn dart regarding this as follows :[www. wiki.sdn.sap.com/.../UsingABAPOOmethodsinWorkflowTasks |www. wiki.sdn.sap.com/.../UsingABAPOOmethodsinWorkflowTasks ]
    I am getting error as " Formal parameter " po number  " not defined.Please Advice.
    Regards,
    Kumar.

    Hi,
    I checked the same still no luck. I checked approx all combination.
    First I created a SOA-SAR file(jar file) , I extracted it and checked all jar files were there. orabpel.jar and bpm-services.jar and log4j jar. when i deployed that jar file. but it was not working
    then I put this in weblogic sever lib. it not worked.
    please tell me some points

  • Errors with CF 8.0.1 hotfix 3 and hotfix 4, "Object Instantiation Exception.Class not found"

    We need to get our servers up to date with the latest ColdFusion hotfixes in order to pass our security scans and policies. We have been following the Adobe instructions for installing the hotfixes, but we’re getting the same errors each time. The CF 8 hotfix 2 works fine, but once we install hotfix 3 and/or hotfix 4, we get the following errors:
    "Object Instantiation Exception.Class not found: coldfusion.security.ESAPIUtils The specific sequence of files included or processed is: C:\ColdFusion\wwwroot\WEB-INF\exception\java\lang\Exception.cfm, line: 12 "
    coldfusion.runtime.java.JavaObjectClassNotFoundException:
    We have dozens of servers running Windows XP, Netscape Enterprise Server 6.1 (I  know, don’t laugh), ColdFusion 8,0,1,195765, and Java Version 1.6.0_04. Just about  the only good thing about running XP on our servers is that it matches  our development boxes, so we have almost mirrored environments for dev,  test, and production. We do NOT have the CF install with the J2EE configuration.
    The crazy thing is, on tech note 51180 (http://kb2.adobe.com/cps/511/cpsid_51180.html), it says that the fix for bug # 71787 (Fix for "Object Instantiation Exception" thrown when calling a Java object constructor or method with a null argument under JDK 1.6.) was added in cumulative hotfix 2. However we don’t see this problem until we go to hotfix 3 (or 4).
    I’ve also been reading that other people had this same problem, and that the CF 8 hotfix 3 was not compatible with certain versions of JDK, then when you read the Adobe site for CF 8.0.1 hotfix 3, it says “Added the updated cumulative hotfix to make it compatible with jdk 1.4.x, 1.5.x and 1.6.x.”, so that makes me think that Adobe was supposed to have fixed this CF 8.0.1 hotfix 3 JDK incompatability issue - but unfortunately it's still not working for us. We have followed the instructions for removing the jar files and starting/restarting the CF server as directed, we’ve tried this 5-6 times, and still no luck.
    Recommendations? Seems like this is a ColdFusion bug to me – one that says is fixed on the Adobe site, but is not fixed in our environment. Please advise, thanks.

    For what it's worth, we had an MXUnit user describe a similar, though not identical, problem after installing the latest hotfixes. In his case, he's getting "NoSuchMethodExceptions".

  • Convert file.class in file.java

    i lost my file.java how to convert my file.class in file.java? help me please!!!!!!!!!!

    search for java decompiler. just know that it won't be anywhere as near easy to read as the original.
    -S-

  • Error *Chart of dep-dependent assignment to asset class 100306 not possible

    Dear All
    I got error Chart of dep - dependent assignment to asset class 100306 not possible
    Diagnosis
        You tried to assign chart-of-depreciation-dependent data to asset class
        100306.
    System Response
        The assignment is not allowed.
    Procedure
        In order to be able to assign chart-of-depreciation-dependent data to
        asset class 100306, the following conditions have to be met. You have to
        have already
        1.  Defined at least two active charts of depreciation
        2.  Assigned asset class 100306 to more than one chart of depreciation
        However, at the moment this asset class is only assigned to chart of
        depreciation 1.
    I already checked following this but I didn't found the mistake (already assign COD to company code).
    Please anyone help me to solved this.
    Thanks in advance.
    Best Regards,
    Utarat.P

    Hi Utarat,
    whenever you create an asset the system checks first the table ANKP.  If you have chart-of-depreciation-dependend account determination, than  an entry in the table ANKP is made. If you than make a copy from such  a asset class in the asset class there is another account  determination than in the table ANKP and the system takes the account determination from the table ANKP and not from the asset class.                                                                               
    Normally you can't define chart-of-depreciation-dependent assignments  (with transaction ANK1) if there is only one chart of depreciation. As a result you'll get error AC012. So, I think there was a  second chart which was deleted.                                                                               
    If you'd like to change (or delete) this assignments you can use            
    the following workaround:                                                   
        SM34 -> View ANKA_ALL -> Maintain                                       
           - select asset class ART (for example)                               
           - then click in the left column on "Chart of dep - dep data"      
    Regards Bernhard

  • Importing a class CEX file using TOOL

    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL code? Is there
    a class in one of the libraries that I can use to do such a task?
    If anyone has some insight into such an endeavor (positive or negative)
    please respond!
    As well, I would like to express my appreciation for this mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, May 13, 1998 3:54 PM
    To: [email protected]
    Cc: [email protected]; [email protected];
    [email protected]; [email protected]
    Subject: Re: Backing up an Environment
    Hi Daniel,
    How can you use RpClean on an environment repository
    which is C-tree ? (Or is there a way to store it as B-tree
    with Forte R3 ?)
    Note also that your Name Server performances may be
    dramatically impoverished after several applications
    install/uninstall (say 8 or 10), once your Env. Mgr repository
    has grown pretty big. The only way to recycle it is then to restart
    it from an export file with the -b option.
    Please let me know,
    Vincent
    On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    <[email protected]> writes:
    Hi,
    It is normal. The Export of the Environment only contains node
    definitions.
    You should also loose your partitioning definition in your Workshop.
    Have you tried the RpClean on the environment repository ?
    I would use the export file only after a crash of the environment on
    production
    site or restart from a backup of the environment repository without
    the
    user
    connexions.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Chael, Tom wrote:
    Every time I export my environment definition and rebuild the
    environment repository I loose my application definitions. I have to
    go into Econsole/Escript to Uninstall and reinstall my applications.
    Is this normal? I am on a Windows NT environment running Forte
    2.0.H.1. I have verified that I am using the correct .edf file when I
    do my environment rebuild.
    -----Original Message-----
    From: Don Nelson [SMTP:[email protected]]
    Sent: Wednesday, April 29, 1998 5:35 PM
    To: Sanchez, Bernardo
    Cc: '[email protected]'
    Subject: Re: Backing up an Environment
    Sanchez,
    Try this simple escript:
    findactenv
    exportenv
    exit
    Note that this will only export the active environments - no
    simulated
    environments will be exported.
    It's also a good idea to rebuild your environment repository
    every now and
    then. How often you do it depends partly on how many and how
    often you do
    deployments, installations, or other changes to the environment.
    However,
    once a month is not a bad starting point.
    Don
    At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    We are currently running a cron job to backup & clean ourCentralRepository
    (bt:central) on a daily basis. This works OK.
    We would also like to backup our forte environment on a weeklybasis. Does
    anyone have a script to do this?
    Thanks in advance.
    Bernardo Sanchez DMC Inc.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with high numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL code? Is there
    a class in one of the libraries that I can use to do such a task?
    If anyone has some insight into such an endeavor (positive or negative)
    please respond!
    As well, I would like to express my appreciation for this mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    -----Original Message-----
    From: [email protected] [SMTP:[email protected]]
    Sent: Wednesday, May 13, 1998 3:54 PM
    To: [email protected]
    Cc: [email protected]; [email protected];
    [email protected]; [email protected]
    Subject: Re: Backing up an Environment
    Hi Daniel,
    How can you use RpClean on an environment repository
    which is C-tree ? (Or is there a way to store it as B-tree
    with Forte R3 ?)
    Note also that your Name Server performances may be
    dramatically impoverished after several applications
    install/uninstall (say 8 or 10), once your Env. Mgr repository
    has grown pretty big. The only way to recycle it is then to restart
    it from an export file with the -b option.
    Please let me know,
    Vincent
    On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    <[email protected]> writes:
    Hi,
    It is normal. The Export of the Environment only contains node
    definitions.
    You should also loose your partitioning definition in your Workshop.
    Have you tried the RpClean on the environment repository ?
    I would use the export file only after a crash of the environment on
    production
    site or restart from a backup of the environment repository without
    the
    user
    connexions.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Chael, Tom wrote:
    Every time I export my environment definition and rebuild the
    environment repository I loose my application definitions. I have to
    go into Econsole/Escript to Uninstall and reinstall my applications.
    Is this normal? I am on a Windows NT environment running Forte
    2.0.H.1. I have verified that I am using the correct .edf file when I
    do my environment rebuild.
    -----Original Message-----
    From: Don Nelson [SMTP:[email protected]]
    Sent: Wednesday, April 29, 1998 5:35 PM
    To: Sanchez, Bernardo
    Cc: '[email protected]'
    Subject: Re: Backing up an Environment
    Sanchez,
    Try this simple escript:
    findactenv
    exportenv
    exit
    Note that this will only export the active environments - no
    simulated
    environments will be exported.
    It's also a good idea to rebuild your environment repository
    every now and
    then. How often you do it depends partly on how many and how
    often you do
    deployments, installations, or other changes to the environment.
    However,
    once a month is not a bad starting point.
    Don
    At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    We are currently running a cron job to backup & clean ourCentralRepository
    (bt:central) on a daily basis. This works OK.
    We would also like to backup our forte environment on a weeklybasis. Does
    anyone have a script to do this?
    Thanks in advance.
    Bernardo Sanchez DMC Inc.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with high numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • RE: Importing a class CEX file using TOOL

    What exactly are you trying to do when you say "import"? I can think of
    two possibilities:
    1. You simply want to import the text of the file, in which case
    you can use Forte's File class.
    2. You actually want to load the class definition and instantiate
    an object based on that class. If so, you will need to deploy the class
    in a library and use Forte's dynamic class loading and instanceAlloc().
    This is well documented in the Forte manuals.
    CJ
    Chris Johnson
    BORN Information Services, Inc.
    612-417-6035 (direct)
    612-510-4077 (pager)
    -----Original Message-----
    From: Geoffery Whitington [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    > ----------
    > From: Geoffery
    Whitington[SMTP:[email protected]]
    > Sent: Thursday, May 14, 1998 9:24:28 AM
    > To: [email protected]
    > Subject: Importing a class CEX file using TOOL
    > Auto forwarded by a Rule
    >
    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL
    code? Is there
    a class in one of the libraries that I can use to do such a
    task?
    If anyone has some insight into such an endeavor (positive or
    negative)
    please respond!
    As well, I would like to express my appreciation for this
    mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    > -----Original Message-----
    > From: [email protected] [SMTP:[email protected]]
    > Sent: Wednesday, May 13, 1998 3:54 PM
    > To: [email protected]
    > Cc: [email protected]; [email protected];
    > [email protected]; [email protected]
    > Subject: Re: Backing up an Environment
    >
    > Hi Daniel,
    >
    > How can you use RpClean on an environment repository
    > which is C-tree ? (Or is there a way to store it as B-tree
    > with Forte R3 ?)
    > Note also that your Name Server performances may be
    > dramatically impoverished after several applications
    > install/uninstall (say 8 or 10), once your Env. Mgr repository
    > has grown pretty big. The only way to recycle it is then to
    restart
    > it from an export file with the -b option.
    >
    > Please let me know,
    >
    > Vincent
    >
    > On Wed, 13 May 1998 00:03:52 +0200 Daniel Nguyen
    > <[email protected]> writes:
    > >Hi,
    > >
    > >It is normal. The Export of the Environment only contains
    node
    > >definitions.
    > >You should also loose your partitioning definition in your
    Workshop.
    > >Have you tried the RpClean on the environment repository ?
    > >I would use the export file only after a crash of the
    environment on
    > >production
    > >site or restart from a backup of the environment repository
    without
    > >the
    > >user
    > >connexions.
    > >
    > >Hope this helps,
    > >
    > >Daniel Nguyen
    > >Freelance Forte Consultant
    > >
    > >Chael, Tom wrote:
    > >>
    > >> Every time I export my environment definition and rebuild
    the
    > >> environment repository I loose my application definitions.
    I have
    > >to
    > >> go into Econsole/Escript to Uninstall and reinstall my
    applications.
    > >> Is this normal? I am on a Windows NT environment running
    Forte
    > >> 2.0.H.1. I have verified that I am using the correct .edf
    file when
    > >I
    > >> do my environment rebuild.
    > >>
    > >> -----Original Message-----
    > >> From: Don Nelson [SMTP:[email protected]]
    > >> Sent: Wednesday, April 29, 1998 5:35 PM
    > >> To: Sanchez, Bernardo
    > >> Cc: '[email protected]'
    > >> Subject: Re: Backing up an Environment
    > >>
    > >> Sanchez,
    > >>
    > >> Try this simple escript:
    > >>
    > >> findactenv
    > >> exportenv
    > >> exit
    > >>
    > >> Note that this will only export the active
    environments - no
    > >> simulated
    > >> environments will be exported.
    > >>
    > >> It's also a good idea to rebuild your environment
    repository
    > >> every now and
    > >> then. How often you do it depends partly on how many
    and how
    > >> often you do
    > >> deployments, installations, or other changes to the
    > >environment.
    > >> However,
    > >> once a month is not a bad starting point.
    > >>
    > >> Don
    > >>
    > >> At 04:54 PM 4/29/98 -0400, Sanchez, Bernardo wrote:
    > >> >
    > >> >We are currently running a cron job to backup & clean
    our
    > >> CentralRepository
    > >> >(bt:central) on a daily basis. This works OK.
    > >> >
    > >> >We would also like to backup our forte environment on
    a weekly
    > >> basis. Does
    > >> >anyone have a script to do this?
    > >> >
    > >> >Thanks in advance.
    > >> >
    > >> >Bernardo Sanchez DMC Inc.
    > >> >
    > >> >
    > >> >
    > >> >-
    > >> >To unsubscribe, email '[email protected]' with
    > >> >'unsubscribe forte-users' as the body of the message.
    > >> >Searchable thread archive
    > >> <URL:http://pinehurst.sageit.com/listarchive/>
    > >> >
    > >> >
    > >>
    > >> ============================================
    > >> Don Nelson
    > >> Regional Consulting Manager - Rocky Mountain Region
    > >> Forte Software, Inc.
    > >> Denver, CO
    > >> Phone: 303-265-7709
    > >> Corporate voice mail: 510-986-3810
    > >>
    > >> aka: [email protected]
    > >> ============================================
    > >>
    > >> "When you deal with high numbers, you need higher
    math." -
    > >Hobbes
    > >>
    > >> -
    > >> To unsubscribe, email '[email protected]' with
    > >> 'unsubscribe forte-users' as the body of the message.
    > >> Searchable thread archive
    > >> <URL:http://pinehurst.sageit.com/listarchive/>
    > >-
    > >To unsubscribe, email '[email protected]' with
    > >'unsubscribe forte-users' as the body of the message.
    > >Searchable thread archive
    > ><URL:http://pinehurst.sageit.com/listarchive/>
    > >
    >
    >
    > You don't need to buy Internet access to use free Internet
    e-mail.
    > Get completely free e-mail from Juno at http://www.juno.com
    > Or call Juno at (800) 654-JUNO [654-5866]
    > -
    > To unsubscribe, email '[email protected]' with
    > 'unsubscribe forte-users' as the body of the message.
    > Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hello,
    I don't know about any forte classes to do the job.
    But, if it just automating the imports that you are concerned with
    then you can accomplish it using fscript.
    For eg. in UNIX machines you can write a shell script to go through
    a directory, get all files with .cex extension and call fscript which
    would open a workspace/repository and do an import plan.
    Hope this helps
    Santha Athiappan
    From [email protected] Thu May 14 09:23:53 1998
    Received: (from sync@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id IAA01294 for forte-users-outgoing; Thu, 14 May 1998 08:43:25 -0700
    Received: (from uucp@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id IAA01283 for <[email protected]>; Thu, 14 May 1998 08:43:22 -0700
    Received: from descartes.com(205.210.27.1) by pebble.sagesoln.com via smap (V2.0)
    id xma001277; Thu, 14 May 98 08:43:10 -0700
    Received: by descartes.com with Internet Mail Service (5.5.1960.3)
    id <KRDBVHV9>; Thu, 14 May 1998 11:45:11 -0400
    Message-ID: <[email protected]>
    From: Geoffery Whitington <[email protected]>
    To: "Johnson, Chris CWT-MSP" <[email protected]>
    Cc: [email protected]
    Subject: RE: Importing a class CEX file using TOOL
    Date: Thu, 14 May 1998 11:45:10 -0400
    X-Mailer: Internet Mail Service (5.5.1960.3)
    Sender: [email protected]
    Precedence: bulk
    Reply-To: Geoffery Whitington <[email protected]>
    Hi Chris,
    The goal that I want to achieve is this: at runtime, read a CEX file from
    my filesystem and "import class" it into my workspace. It is equivalent to
    invoking the menu item "Component,Import Class/Interface".
    Basically I am generating hundreds of TOOL classes and I don't want to
    manually import them myself. I am aware of the Forte Code generator, but
    the classes I wish to generate are much too complex for the generator (I
    want virtual attributes based upon NonKeyAttributes, with their own Set and
    Get methods, as well as methods with changing/variable parameters -
    something I believe that the generator cannot handle).
    Cheers,
    Geoff Whittington
    -----Original Message-----
    From: Johnson, Chris CWT-MSP [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 11:19 AM
    To: 'Geoffery Whitington'; [email protected]
    Subject: RE: Importing a class CEX file using TOOL
    What exactly are you trying to do when you say "import"? I can think
    of
    two possibilities:
    1. You simply want to import the text of the file, in which case
    you can use Forte's File class.
    2. You actually want to load the class definition and instantiate
    an object based on that class. If so, you will need to deploy the class
    in a library and use Forte's dynamic class loading and instanceAlloc().
    This is well documented in the Forte manuals.
    CJ
    Chris Johnson
    BORN Information Services, Inc.
    612-417-6035 (direct)
    612-510-4077 (pager)
    -----Original Message-----
    From: Geoffery Whitington [SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    From: Geoffery
    Whitington[SMTP:[email protected]]
    Sent: Thursday, May 14, 1998 9:24:28 AM
    To: [email protected]
    Subject: Importing a class CEX file using TOOL
    Auto forwarded by a Rule
    Hi Forte Users,
    Would anyone know how to import a class CEX file using TOOL
    code? Is there
    a class in one of the libraries that I can use to do such a
    task?
    If anyone has some insight into such an endeavor (positive or
    negative)
    please respond!
    As well, I would like to express my appreciation for this
    mailing list - it
    has carried some excellent Forte dialogue.
    Thanks for all your help!
    Geoff Whittington
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    >
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Breaking Down Classes Into Files

    I'd like to know what's considered best practice when dividing multiple classes into seperate files. I know you can have only one public class per file, and I've heard some people say it's best to have one class per file, period. But the one-class-per-file rule seems overly strict.
    To give a specific example, I have a class which manages event handlers and event generators. The class receives events and delegates them to one of its registered handlers. The handlers can, in turn, spawn new events by calling the event generators, which have package access.
    Currently, I have the handlers, the generators, and the public class which manages them all in one file, which I know is not good, especially since some of the handlers and some of the generators are fairly large classes in their own right. However, it would be silly (I think) to put every handler and every generator in its file, because some of them are almost trivially small, and none of them have public access. But what is the best way to break them down: Should I put the handlers all in one file, and the generators all in one file, giving me three files total? Or are there other principles that should guide me?
    Thanks for any thoughts,
    John

    That's a good point. Although, as you said, it
    doesn't really apply in my case. That is, if I put
    all the handlers in a file called EventHandlers.java,
    that should be pretty clear for me. And, in fact, it
    would probably be easier to work with the classes if
    they are all in one file.But what do you think about when I say reuse? Don't you think that one class per file will make it easier to reuse the classes? As it is now you have to take them all. Since you have things that are in common for them I would say that you must have interfaces, and abstract classes. Couldn't they be reused in another project? So there are benefits even in small projects. It's also better to have many files if there are several developers and your version manager doesn't allow multiple checkouts of the same file.
    >
    Also, you mentioned sub-packages. I'm assuming
    classes in sub-packages do not have access to their
    parent's package-access members. What I really would
    like is to prevent any classes except the event
    handlers from accessing my EventManager's generator
    members. Could you solve that problem in another way? Why do they need access to the EventManager?
    Are you saying I should put all the other
    classes in a sub-package? I say that you should put related classes in sub-packages. Look at the package structure of the java core (can be seen in the javadoc)
    /Kaj

  • Question : Save AWT Image Class to File..

    I Have a Question.. @.@a
    I'm doing AWT transform now..
    Well...
    I have a problem..
    I want to save AWT Image class to file..
    But.. I don't now that..
    Input Image Class same below..
    Image imageContent = (Image)attachment.getContent();
    How does it save imageContent Image class to file..?

    I had the same problem... convert it to a BufferedImage (http://forum.java.sun.com/thread.jspa?threadID=665744&tstart=15), then use javax.imageio.ImageIO.write to save it to a file.

  • Export ABAP Classes to File

    How can I export an ABAP class to file? After exporting how can I import an ABAP class from file?
    Thanks
    Rene

    Hello,
    I have the same problem: export and import ABAP classes.
    You said to check out the CL_OO_* classes but I did not
    find a method to export or import classes to or from file.
    I really would be thankful when you could give me a more specific answer.
    Regards,
    Alex

  • Why we can't instantiated System class.

    Hi All,
    I can't undersatnd what type of class is "System". We can't instantiated system class but we can use it like a Static class.

    There are number of classes like that. You don't
    instantiate them because you don't need to.Objects
    have state and behavior. State is captured inmember
    variables. None of the functionality the Systemclass
    provides requires an object to be instantiated and
    maintain state in member variables. It's pure
    behavior.I beg to differ. Given he fact that it has attributes
    (e.g. in, out and err), it does have a state...They're static attributes, so no instance (if one existed) would have its own state that would potentially distinguish it from other instances. That's what I was talking about.
    I, personally, think that static classes are rather
    bad OO (it's objects doing the work, not classes),
    but singletons are too burdensome to create.You mean uninstantiable classes with only static methods? (System is not a static class. Only nested classes can be static.)
    If your goal is to write pure OO, then, yeah, they might be bad. But then I don't think "perfect OO" is a particularly important or useful goal. Tool for the job and all that.

  • Problem instantiating a class defined in an external file

    I'm new to java and I'm having difficulties creating an instance of a class that is defined in another file. The source file and the file containing the class I wish to instantiate exist within the same folder.
    I have my classpath set so that it is pointing at my java install folder
    and the folder in which the source file and the file containing the class I wish to instantiate
    Here is the sourcefile
    import Deck;
    Deck myDeck = new Deck();
    public class soli {
    public static void main(String[] args) {
    Here is the compile error
    soli.java:11: 'class' or 'interface' expected
    Deck mydeck = new Deck();
    I'm sure I'm making an extremely silly mistake somewhere, thanks in advance for any replies

    Here is the sourcefile
    import Deck;
    Deck myDeck = new Deck();
    public class soli {
    public static void main(String[] args) {
    well, there is something missin frm this CLASS!
    try this:
    public class Soli {
    Deck deck = new Deck();
    // main and stuff
    }you see, that variable deck is IN the class, not outside of it...

  • Instantiating a class within a class

    I've got a package with 2 classes. The first, we'll call it
    C1, is being instantiated within the main body of code. In turn, it
    instantiates another class, C2.
    Problem is, the C2 instantiation is not happening. However,
    if I instantiate the class within the main code body, the
    instantiations within C1 work ok. A chopped down version of my
    code:
    // main.swf
    import stuff.*;
    var myC1:C1 = new C1();
    var myC2:C2 = new C2(); // remove this line and the line
    below stops functioning
    // C1.as
    class stuff.C1 {
    public function C1() {
    trace('C1 instantiated');
    var anotherC2 = new C2(); // this line doesn't work unless
    the line above is included
    // C2.as
    class stuff.C2 {
    public function C2() {
    trace('C2 instantiated');
    So if I take the classes out of the package it works also, so
    I'm guessing it has something to do with the way I'm importing the
    files maybe? I dunno. Any thoughts?

    What Darcia wrote make me suppose that a class is totally created with the first line of a java file (i.e. public class PrivAndPublic{ )and initialized by the constructor (which, if omitted, comes by default with no arguments)...after all this, the class can be instantiated many times I want from inside the class itself.
    (I was thinking the class needed to reach the matching close curly brace to be possible to instantiate it)
    But as phyzome said I have to be careful to do not make the object call the method which I put the object in, otherwise I will cause an infinite loop...as I did try ;)
    Thanx guys, see you.

  • Instantiating Java class while WAS is starting

    Is there a possibility to register Java classes within the SAP WAS which will be instantiated while the server starts up?

    Hi,
    to be honest, I have only a rough idea - may be you can emulate this behaviour  by  a web application, where in the deployment descriptor the load-on-startup flag is set ?
    Barbara

Maybe you are looking for

  • Replication in SAP R/3 on SQL server

    hi,   We want to read of R/3 data for some legacy system. I know that there are many ways for this matter but is there any limitation for one-side replication of data in SAP R/3 to a middle ware database? We use MS SQL server as R/3 RDBMS. Thanks a l

  • Pdf options box missing when saving as pdf

    When saving as a pdf in Illustrator CS3, the PDF OPTIONS box is missing, and the program locks up.  If I hit ENTER (as if the options box was there), the file saves properly, and the program is unlocked.  It appears that the OPTIONS box is hidden, bu

  • Format an excel

    Hi, My requirement is to format an excel sheet. I have the excel already on my system and now i need to adjust the column sizes and make the first line in the excel to bold characters. This the code that i have written ****declarations   INCLUDE ole2

  • Pages "save as" format

    i created a photo/text pages document(like a newsletter) with some jpegs,,about 3 pages, i saved and then zipped and sent to a pc user,, well it didnt come out as sent.. how do i save a newletter type doc with text and pictures and in what format so

  • Help with a school project please

    Finally got the code to compile without errors, but now it is giving me a null pointer exception and I can't see it (blind, maybe) Can someone help me see what I have done wrong? Exception: Exception in thread "main" java.lang.NullPointerException at