How to use classes from an existing outside library ?

Dear People,
I added a library to use classes already built.
In JBuilder7 I went to Tools | ConfigureLibraries
and added the objectdraw library. At the left when I look in the
directory structure under User Home is "objectdraw" so I did
add the library correctly but when I put in the coding a try
to run it, the error messages say:
"MakeBox.java": Error #: 200 : <identifier> expected at line 8,
which is the line : public void MakeBox()
The entire code is :
package stan_e_makebox;
import objectdraw.*;
import java.awt.*;
public class MakeBox extends WindowController
void public MakeBox()
public void onMousePress(Location point)
new FilledRect(40,80,30,20,canvas);
public static void main(String[] args)
new MakeBox();
Thank you in advance
Stan

oo sorry,
this is the constructor i assume, so should be
public MakeBox()

Similar Messages

  • How to use photos from a *shared iphoto library* in iWeb's Photos page

    I have a large library of pictures in iPhoto. I am sharing it with my wife's Mac on our LAN. She would like to use many of these photos on my Mac in an iWeb page. We're both using 10.4.10 with G5s.
    When we try to drag them over from my shared iPhoto library, we get the following error:
    "Some items can't be used because you don't have enough access privileges or because they contain no content or they are corrupted.
    unable to add object
    unable to add object"
    Sometimes it imports only the name of the picture to the iWeb page.
    Is there a way around this? I tried messing with the Get Info "Permissions" section of my iPhoto folder. But nothing seemed to change.

    iPhoto can not merge libraries
    And you must NEVER Import an iPhoto library - it does not work and creates a massive mess
    To merge libraries you must either use Aperture (being phased out this year) or the paid version of iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - 
    Or continue to have two libraries and switch between them
    LN

  • How to use classes from different user defined Packages

    well i made 2 packages... one containing employee class and realted matter and other contaning bankaccounts and bank related work... now how can i use them in an another.. i know about the import statement but still couldn't make it work.... now suppose iam makin a obejct of employee class and passing in name and salary and all in the constructor... now i want that when i create the bankaccount class then the name of the employee should be passed to the bankaccount class so that it can assigen a account no. .. now how do i do this as when i create a object of employee class its made at runtime.. and if i create a object of bankaccount.. how wil it take that name as before goin to bank account i should already have a list of emplyees and then this list should be worked upon by the backaccount class to assign the accountno.s
    Hope my question was clear... would appriciate a explanation and guidance!!!

    Thank you so much ... i was able to solve the problem... i passed the object in the constructor of the accounts class and it all worked out the way i wanned... thank you so much... it wasn't that difficult but the idea was just not clicking...this place is wonderful... everyone rocks!!! and so greatful about all the help.. please keep up the good work and even i will try to contribute as much as possible!!

  • Need samples how to use classes in WebDynpro

    Hi,
    I Need To simple Samples how to use classes in WebDynpro.
    Regards

    Continued....
    and in the model
    right click->create model
    select the radio button import java bean .
    next ADD jars option will be seen
    Browse the jar on the dekstop.
    now add this model to the used models by right clicking on it.
    Now if you go to Data Modeler.
    You will find the used model.
    From there map to the component controller->view Controller.
    And continue with ur coding.
    Hope this helps you.
    Thanks & Regards,
    Lokesh.

  • HOW TO USE CLIPS FROM A DVD???

    HOW TO USE CLIPS FROM A DVD???
    i know this may be a stupid and obvious question but i can't seem to figure it out.
    these are not copyrited dvds... mostly home movies and old home movies put onto dvd.
    thank you... much appreciated.

    Studio X has given one suggestion.
    MPEG Streamclip is another:-
    http://www.squared5.com/
    It is free but your computer may not have the QT MPEG 2 Playback Component which costs $20 from Apple as a download.
    If you have access to an Analogue-DV converter you can use that. Also a DV camcorder which has Analogue IN.
    If you have Final Cut Pro installed, you will have the QT component.
    Message was edited by: Ian R. Brown

  • Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    BM,
    Pop-Up menu format is not dynamic. It is created in the Cells Inspector and can't be modified contingent upon the state of other cells.
    You could program a table to list the options available for the previous selection, but it wouldn't be in the form of a Pop-Up.
    Jerry

  • How to make changes in an existing adf Library

    Hi,
    I am having an adf library, I am looking to make some changes in that adf library and put it back into the project.
    Please let me know how to make a jdeveloper project from the existing adf library,as I not having the original project from which this library was created.
    Please help..
    Thanks

    Hi Timo,
    I have created an adf project and have created an adf library using the same.
    Now when i am creating the adf library using the same project its giving me some errors, so looks like I have done some changes in the original project which might be causing the issue.
    So this is the reason I was looking for an option to rebuild the project using adf library files.
    I need to do some changes in jsf file of the deployed adf library.
    Thanks again for your help

  • How to use .class files from jsp

    hi i want to use .class files in my jsp program can any one help me

    so if you are using pacakges here is normal example...
    say you .java code is something like...
    package com.util;
    public Class BeanUtility{
    }place the .class file at WEB-INF/classes/com/util folder if those folders are missing create it and place the .class file there. or pacakage it as a jar file & put it into WEB-INF/lib folder
    Now in jsp you can either use jsp:Usebean tag or use normal scriplets to create an instance of the nessary class...
    here is an example for you
    <%@ page language="java" import="com.util.BeanUtility" %>
    <%
    BeanUtility bn = new BeanUtility();
    %>however,i'd suggest you to make use of JSTL / Inbuilt tag libraries /MVC 2.0 approach for better maintainance & readablity.
    Hope this might help
    REGARDS,
    RaHuL

  • How to allow ping from inside to outside in 2900 router?

    Hi,
    I have a Cisco router 2900 with firewall, i need to know how can i allow the ping from self zone to outside zone, i trried to create policy from self to outside but i still didn't allow ping or tracert, i get that message when i try to ping from cisco router:
    "Unrecognized host or address, or protocol not running"
    any help will be appreciated.
    Thank you

    Hi jcarvaja
    here is the used configuration:
    Building configuration...
    Current configuration : 5584 bytes
    ! Last configuration change at 09:00:20 UTC Tue Apr 9 2013 by admin
    version 15.1
    service timestamps debug datetime msec localtime show-timezone
    service timestamps log datetime msec localtime show-timezone
    no service password-encryption
    service udp-small-servers
    service tcp-small-servers
    service sequence-numbers
    hostname Router
    boot-start-marker
    boot-end-marker
    security authentication failure rate 3 log
    security passwords min-length 6
    no logging buffered
    no logging console
    enable secret 5
    no aaa new-model
    no ipv6 cef
    ip source-route
    ip gratuitous-arps
    ip icmp rate-limit unreachable 1
    ip cef
    ip name-server 163.121.128.134
    ip name-server 163.121.128.135
    ip port-map user-custom-fleet port tcp 2000 list 1
    multilink bundle-name authenticated
    crypto pki token default removal timeout 0
    crypto pki trustpoint TP-self-signed-324261422
    enrollment selfsigned
    subject-name cn=IOS-Self-Signed-Certificate-324261422
    revocation-check none
    crypto pki certificate chain TP-self-signed-324261422
    certificate self-signed 01
      30820229 30820192 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
      30312E30 2C060355 04031325 494F532D 53656C66 2D536967 6E65642D 43657274
      69666963 6174652D 33323432 36313432 32301E17 0D313330 34303930 38343034
      375A170D 32303031 30313030 30303030 5A303031 2E302C06 03550403 1325494F
      532D5365 6C662D53 69676E65 642D4365 72746966 69636174 652D3332 34323631
      34323230 819F300D 06092A86 4886F70D 01010105 0003818D 00308189 02818100
      B8ABD60F 8C879B3B BC1C1643 48059AD2 F940A700 6D58161E 37D53E6E E028B806
      61EAA942 CED2A3C6 3FB3A47E 20E05B10 0941A9D8 38FFA6F9 D2B9E52C 225A57BA
      14F8842A A26E7E02 38E9F7C8 328504D0 5C3EEE41 CC75B237 BBD07CBA 1A850540
      2A5AAFAD 4553FB03 0E366211 9AC09967 4DC03082 0AF546A3 F6AA2739 1D8A8AA9
      02030100 01A35330 51300F06 03551D13 0101FF04 05300301 01FF301F 0603551D
      23041830 16801428 FEEB3910 B7A1D374 1F86BCD5 96CEDF75 8DF11E30 1D060355
      1D0E0416 041428FE EB3910B7 A1D3741F 86BCD596 CEDF758D F11E300D 06092A86
      4886F70D 01010405 00038181 006BBF7A 430905F6 D5B27B0D 96315504 87816DAA
      B5EA86D9 6E9A1D58 7B328C88 A6A358D0 00D035A9 8CDDEC41 15AF0108 F5CB1072
      B0485D7D CFC0D0CB 71E9B153 FB7B8B40 40C157E4 B254D01C 890D615F D8395545
      F0B47E0B 57341EB2 C0CE0039 DC18EAD6 078986F0 A5A5D04F D5041DB6 23CAA002
      4901248C 95B61A0B 3ED5B26A EF
          quit
    license udi pid CISCO2901/K9 sn FCZ1526C3JL
    object-group service Outside-Reply
    icmp echo-reply
    username admin privilege 15 secret 5
    redundancy
    ip finger
    ip tcp synwait-time 10
    ip ssh time-out 60
    ip ssh authentication-retries 2
    class-map type inspect match-any Deny_ALL
    match access-group name dwdwd
    class-map type inspect match-any Inside-Outside
    match protocol http
    match protocol https
    match protocol dns
    class-map type inspect match-any ICMP_RQST
    match protocol icmp
    policy-map type inspect Inside-Outside
    class type inspect Inside-Outside
      inspect
    class class-default
      drop
    policy-map type inspect Self_to_Outside
    class type inspect ICMP_RQST
      inspect
    class class-default
      drop
    policy-map type inspect Outside_to_Self
    class type inspect Deny_ALL
      pass log
    class class-default
      drop
    zone security IN
    zone security OUT
    zone-pair security Self_to_Outside source self destination OUT
    service-policy type inspect Self_to_Outside
    zone-pair security Outside_to_Self source OUT destination self
    service-policy type inspect Outside_to_Self
    zone-pair security Inside-Outside source IN destination OUT
    service-policy type inspect Inside-Outside
    interface GigabitEthernet0/0
    ip address 101.101.100.245 255.255.255.0
    ip mask-reply
    ip directed-broadcast
    ip flow ingress
    duplex auto
    speed auto
    interface GigabitEthernet0/1
    description $FW_INSIDE$
    ip address 49.31.152.80 255.255.255.248
    ip mask-reply
    ip directed-broadcast
    ip flow ingress
    zone-member security IN
    duplex auto
    speed auto
    interface Serial0/0/0
    no ip address
    ip mask-reply
    ip directed-broadcast
    ip flow ingress
    encapsulation frame-relay IETF
    no fair-queue
    frame-relay lmi-type q933a
    interface Serial0/0/0.16 point-to-point
    description $FW_OUTSIDE$
    ip address 172.17.18.122 255.255.255.252
    ip mask-reply
    ip directed-broadcast
    ip flow ingress
    ip verify unicast reverse-path
    zone-member security OUT
    frame-relay interface-dlci 16  
    interface Serial0/0/1
    no ip address
    ip mask-reply
    ip directed-broadcast
    ip flow ingress
    shutdown
    clock rate 2000000
    ip forward-protocol nd
    ip http server
    ip http access-class 2
    ip http authentication local
    ip http secure-server
    ip route 0.0.0.0 0.0.0.0 Serial0/0/0.16
    ip identd
    ip access-list extended ICMP
    remark CCP_ACL Category=128
    permit ip any any
    ip access-list extended deeef
    remark CCP_ACL Category=128
    permit ip any any
    ip access-list extended dwdwd
    remark CCP_ACL Category=1
    permit object-group Outside-Reply any any
    access-list 1 remark CCP_ACL Category=1
    access-list 1 permit 196.219.234.77
    access-list 2 remark Auto generated by SDM Management Access feature
    access-list 2 remark CCP_ACL Category=1
    access-list 2 permit 101.101.100.0 0.0.0.255
    access-list 2 permit 10.20.10.0 0.0.1.255
    no cdp run
    control-plane
    line con 0
    login local
    transport output telnet
    line aux 0
    login local
    transport output telnet
    line vty 0 4
    login local
    transport input all
    line vty 5 15
    login local
    transport input all
    scheduler allocate 20000 1000
    end

  • URLClassLoader loading class from jarB, which uses classes from jarC

    Hi, here's my problem:
    I have a classA in executable jarA.
    This uses URLClassLoader to load classB from jarB. So far so good.
    But classB uses classC, which lives in jarC. jarC is specified in the Class-Path of the manifest in jarB. But classB gets a ClassNotFound exception when it tries to use classC.
    The situation I want to achieve looks like this (sorry for the bad art; it's almost impossible to make it look better because sun strips out extra spaces):
    jarA:
    classA-----> URLClassLoader(jarB).loadClass(classB)
    jarB:
    Class-Path jarC
    classB------> new classC
    jarC:
    classC
    My expectation was that URLClassLoader would automatically be used to load all the classes that classB uses, and that it would extend its classpath by the classpath specified in the manifest of jarB, just like the default classloader does. Anyone know what I'm doing wrong?
    When I do the following, i.e. use only the default classloader, everything works fine. Unfortunately I won't know where jarB is until runtime, so I can't actually do this:
    jarA:
    Class-Path jarC
    classA-----> new classB
    jarB:
    Class-Path jarC
    classB------> new classC
    jarC:
    classC
    thanks alot
    j

    Actually, there is definitely a way to make this work. A plugin engine has to handle this in order for plugins loaded by separate loaders to be able to share class instances with one another (dependency). My engine does static runtime plugin dependency resolution, which means it parsers every plugin's config file, then after all plugins are in the "registry" it goes back and resolves all dependencies. How it does this is that each PluginClassLoader keeps a list of "dependent" classloaders. So, if the engine finds plugin A, B, and C, and B depends on C (declares this in its config file), the engine creates 3 class loaders (custom loader called PluginClassLoader), one for each plugin. This is done so that the plugin can be unloaded or reloaded at runtime without having to shut the application down. Now, since B depends on C, when plugin B code requests a class found in C, the JVM first asks B's loader to find the class. The "normal" delegation model of Java is for B's loader to first look in the parent hierarchy, then in its own classpath. The problem with this approach is that in order to support reloadable and unloadable plugins, you do NOT want your plugin .jar file at any location within the main application classpath. The plugin .jar file should be able to be at any URL location outside of any other classpath, even perhaps at another web site.
    So, the JVM asks B to find the class in C. But B's loader isn't able to find it because it is not in B's classpath. The trick is to do one of a couple things. First, remember that each loader keeps a list of dependent loaders. Second, in order to avoid any tie-in to the main classpath, we break the normal classloader delegation model by overriding the loadClass() method. In here we want to first check our local cache of loaded classes. The built-in method findLoadedClass() handles this for us. If that doesn't return a Class, then we want to look in our own classpath. In this case, we only want to look for any classes in B's plugin .jar file. C's class of course wont be found here. So the next step is to delegate to our "dependent" list of loaders. Aha, you say? This is the trick (credit goes to the Eclipse IDE team where a few members taught me this and was able to help me solve my very same problem). By delegating to a dependent loader, B's loader effectively asks C's loader to find C's class. The same thing happens, only this time it is now C's loader doing the work. The very first time the calls is made, no classes are loaded yet, so the finding of the C class in the local cache of C's loader wont yet work. The next step though, looking in C's classpath (C's .jar file) WILL find the class. It is loaded, put in C's loader cache and the Class is returned. Now, at this point B now has a Class from C's classpath that it can use.
    Now, my first foray into this made me think that if B asks C to find it, and C finds it and loads the bytecode, doesn't B's loader also need the bytecode in order to properly "see" the C class. Apparently, this is not needed. I am guessing the JVM keeps a repository of bytecode, so that so long as you have the C ref (location in the JVM's memory where C's bytecode is), you don't need to re-load the bytecode of C into B's loader. Thus, B's loader now can "see" the C class without actually having to have loaded the bytecode of C. Now, B's code can typecast C, use it, etc. Beautiful aint it?
    Let me know if you have any further questions.

  • How to use "Add from POM" to add source path and docpath?

    Hi
    My team is developing multiple projects with JDeveloper 11gr2.
    We share libraries and sources between team members using maven extension for JDeveloper.
    We deploy class jar, source jar and javadoc jar to repository.
    The project pom has some dependency defined as below
    <dependency>
                <groupId>com.example</groupId>
                <artifactId>CommonClient</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <type>jar</type>
                <scope>compile</scope>
    </dependency>
    We use ProjectProperties->Mave->Dependencies->Add from POM button to add dependecies to Project.
    The problem is that the class jar is added to the classpath but the source jar and javadoc jar are not.
    As a result, Team members cannot see the javadoc in code editor.
    Configure IDE libraries is an option but does not work well with maven.
    Does anyone know how to add source jar and javadoc jar to project using "Add from POM" button?
    Thank you!

    Hi ,
    Sample code snippet for GET_RELATED_CONTENT is as follows :
    dataBinder.putLocal("IdcService", "GET_RELATED_CONTENT");
    dataBinder.putLocal("dSource","CS");
    dataBinder.putLocal("dID","3202");
    dataBinder.putLocal("dLinkTypeID","1");
    serializer.serializeBinder (System.out, dataBinder);
    // Send the request to Content Server
    ServiceResponse response = idcClient.sendRequest(userContext,dataBinder);
    // Get the data binder for the response from Content Server
    DataBinder responseData = response.getResponseAsBinder();
    // Write the response data binder to stdout
    serializer.serializeBinder (System.out, responseData);
    // Retrieve the SearchResults ResultSet from the response
    DataResultSet resultSet = responseData.getResultSet("RelatedContent");
    // Iterate over the ResultSet, retrieve properties from the content items
    for (DataObject dataObject : resultSet.getRows ()) {
    System.out.println ("Related ContentID is : " + dataObject.get ("dDocName") );
    Point to note is :
    dLinkTypeID is set to 1 . Reason being that the rendition related content is used to link items . So looking for those related items which are as Renditions .
    This value would be as follows :
    dLinkTypeID Related content type
    1 Rendition
    2 Supersedes
    3 Has Supporting content
    4 Cross References
    2 more sub types are :
    Supports - dLinkTypeID=3 and extraparameter is isGetParents=1
    Cross Referenced By - dLinkTypeID=4 and extraparameter is isGetParents=1
    Hope this helps .
    Thanks,
    Srinath

  • How to use classes of packages in flex mx:Script/ or mxml/

    Hi.I am just learning Flex using Flex Builder 3 facing one problem,
    Suppose I declare one package with name alert.as
    package
    import mx.controls.Alert;
    public class alert
    public function alertBtn()
    Alert("Hello btn 1");
    Now in want to use the function in mxml that I declared in a package.
    <mx:Button label="btn1" click="alertBtn();"  />
    I have few questions
    1)How to Import the class alert.as in <mx:Script> and where should i store the file alert.as in the directory folder of flex?
    2)How to call the function alertBtn() when btn1 is clicked.
    Thanks so much!
    Regards
    Ankur

    Hi Greg.I think I was not able to clear my problem properly.Let me try this time again.
    What I wanted to do was that in the below written code I have the full access of the id=panel1 in the  script tag .This works properly.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import flash.display.Sprite;
    import mx.core.UIComponent;
    private function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="addChildToPanel();"/>
    </mx:Application>
    This above functionality when I tried to do using class Outside the code ,its not working !
    Here is with the package:-
    But suppose I make One package 
    package
    import flash.display.Sprite;
    import mx.core.UIComponent;
    class getPanel extends Sprite
    public function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
              }//class
                        }//package
    Now in MXML
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import getPanel;
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="getPanel.addChildToPanel();"/>
    </mx:Application>
    So My problem is that this code doesnt do anything.
    Neither the addChild function is working in it ,Nor the Panel1 is accessible here.
    Can u pls help me here.
    Thanks
    Ankur

  • How to use class loaders?

    Hi all,
    I wrote a very simple plugin engine. What I would like to do is allow for each plugin loaded, to be done in such a manner that it can be unloaded and/or reloaded at runtime without the entire application bein restarted. I know this is possible as I have seen some app servers that allow this. Basically, I want to make sure that when I null out the class loader, that the class is removed from memory. How I am testing this is simple. Load a plugin which adds a menu item. Attempt to unload the class (via nulling the class loader), and clicking on the menu item. This would normally go into the class loaded, but if it is unloaded, then it should throw some sort of exception (is this correct?). Below is what I have to load a plugin. The goal here is to be able to load a plugin with its own classloader, so that I can unload it later while not having to shut down the application. Also, one thing I am confused on. It seems no matter what I use for the URL object (in the try..catch block when creating it), it always finds my plugins with the path attribute I pass in. So I am a bit confused as to what the purpose of the String argument for the URL constructor is for. Lastly, reading the API for ClassLoader and methods like findClass, loadClass, etc, it seems that it will ALWAYS go to the parent class loader first to try to load the class. If the parent is null (as is in this case because I am creating a new class loader each time a plugin is to be loaded), it uses the bootstrap loader, which is the JVM loader. The problem I have with this is how do you force the loader to be the one you are creating, and not the JVM loader. I don't kow if the JVM loader is able to find my class or not, but I assume it is finding it because the URL constructor seems to take in anything and still find my plugin classes. So I am wondering if there is a better way to enforce or ensure that each new URLClassLoader instance is infact in control of the class it loads, and not the JVM class loader which would make it impossible to unload a single class.
    public boolean loadPlugin(String path)
    URL urls[] = new URL[1];
    try
    urls[0] = new URL("file://" + path);
    catch(MalformedURLException murle)
    System.out.println("Malformed URL");
    URLClassLoader loader = new URLClassLoader(urls);
    try
    Plugin plugin = (Plugin)loader.loadClass(path).newInstance();
    plugin.init(this); // add menu item.
    loader = null; // attempt to unload class
    return true;
    catch(Exception e)
    e.printStackTrace(System.out);
    return false;
    }

    Basically, I want to make
    sure that when I null out the class loader, that the
    class is removed from memory.The class is removed from memory when it is garbage, i.e. when there are no references to it left.
    Note that:
    - Every instance (i.e. object) of the class holds a reference to its class object.
    - The classloader that loaded the class holds a reference to the class object.
    Load a plugin which adds a menu item. Attempt
    to unload the class (via nulling the class loader),
    and clicking on the menu item.Obviously the class can't be unloaded while the menu item has a reference to an object of the class.
    Also, one thing I
    am confused on. It seems no matter what I use for the
    URL object (in the try..catch block when creating it),
    it always finds my plugins with the path attribute I
    pass in.This obviously means that the bootstrap classloader finds your class. Remove the class from your classpath e.g. by moving it to a subdirectory.
    Here is some sample code that should work. This is meant as a proof of concept, you probably want to do some things differently. I'm also writing this from the top of my head, so I can't guarantee that there are no errors here.//this file (Plugin.java) should be in your classpath
    public interface Plugin {
        //method declarations
    }---//this file (MyPlugin.java) must NOT be in your classpath
    public class MyPlugin implements Plugin {
        //methods
    }---//this file (MainClass.java) should be in your classpath
    //this is the main program
    //import stuff (e.g. URLClassLoader)
    public class MainClass {
        private ClassLoader loader;
        private Class plugin_class;
        private URL[] plugin_path; //set this
        public static void main(String[] args) {
            MainClass mc=new MainClass();
            //load an instance of the plugin
            Plugin p1=mc.getPlugin();
            //now modify the "MyPlugin.class" file
            //then you must load the new MyPlugin class
            mc.reloadPlugin();
            //load an instance of the new plugin
            Plugin p2=mc.getPlugin();
            //now p1 is the old MyPlugin and p2 the new MyPlugin
            //if we don't need the old plugin anymore we can do this
            p1=null;
            //Now there are no more references to the old
            //plugin class so it (and its classloader object)
            //may be removed by the garbage collector
        public MainClass() {
            reloadPlugin();
        public Plugin getPlugin() {
            return (Plugin)plugin_class.newInstance();
        public void reloadPlugin() {
            loader=new URLClassLoader(plugin_path);
            plugin_class=Class.forName("MyPlugin", true, loader);
    }Now, for the sake of argument, suppose that we would change MainClass.getPlugin() to this:    public MyPlugin getPlugin() {
            return (MyPlugin)plugin_class.newInstance();
        }Now MainClass uses MyPlugin so the MyPlugin class will be loaded when the MainClass class is loaded. However, this is not at all what we want.
    If we change it back to the way it was we notice that when the MainClass class is loaded then only the Plugin (interface) class is loaded. This way the MyPlugin class won't be loaded until we load it manually through our own classloader, and this is exactly what we want.
    This is why we usually handle all dynamically reloadable classes through interfaces instead of using the classes directly.
    - Marcus

  • How to use classes CL_DOCX_*

    We have a need to use word 2007 OOXML classes  all of which start with CL_DOCX*.
    Basically what we are trying to do is take a DOCX files (File 1 & File 2) saved by MS WORD 2007 application and replace the header of File 1 with the header from File 2.
    The basic functionality described above is working fine. However the same is not working when the header from File 2 has an IMAGE embedded in it.
    We found several  word 2007 OOXML classes  in the system (all of which start with CL_DOCX*), but couldn't find usage for these classes anywhere in the system or SDN or OSS Notes etc.,
    Just wondering whether anyone used these classes in their development environment and whether they can share this information here?
    Any help in this regard is highly appreciated.
    thanks,
    -Sreenath

    Which NetWeaver release are you using? The whole OOXML seems to be evolving within EhPs.
    You'll find examples how to use the framework in the Unit Tests of class CL_DOCX_FORM - so have a look at those classes. For me those test code runs fine.
    Best Regards,
    Tobias

  • How to use classes in Actions tab

    Hello guys!
    I'm just a beginner so i'm sorry for my stupid question.I'm developing a game in which movie clips in our case people have their own schedule.I have multiple screens and so i want to be able to set their locations and make them invisible on other screens(rooms)they're not currently at.The trouble is i can't use variables from Actions in my class,neither can i use classes in my Actions.Can anyone tell me how to export classes into Actions code?
    Here is my code:
    var currentlocation;
    var currentscreen;
    if (person.currentlocation!==currentscreen){
    person.visible=false;
    btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              currentscreen = "classroom";
              classroom.visible = true;
              playroom.visible = false;
    btn_2.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
    function fl_MouseClickHandler_2(event:MouseEvent):void
              currentroom = "playroom";
              classroom.visible = false;
              playroom.visible = true;

    Your problem/question is not clear to me.  If you are getting errors you should include the error messages in your posting.
    Could the problem arise from using a variable that is not defined?
    currentroom = "playroom";
    I do not see currentroom defined as a variable anywhere.  There is a currentscene variable though.

Maybe you are looking for