Obtaining a resource statically in an applet

Hey guys,
I have an applet where a number of image files are stored statically in resource classes. However, they are retrieved by file name, which is a problem when trying to put it on the web. Example below:
public static Image First= Toolkit.getDefaultToolkit().getImage("Resources/1/First.png");Any suggestions?

Sure thing:
An applet:
import java.applet.Applet;
import java.awt.Graphics;
public class app extends Applet {
     public void paint (final Graphics g)
          g.drawImage(resource.x, 0, 0, this);
}and a resource class holding a static image:
import java.awt.Image;
import java.awt.Toolkit;
public class resource {
public static Image x = Toolkit.getDefaultToolkit().getImage("IMG.gif");
}Compiling and dumping the 2 as well as the image in a JAR file, then running the applet yields:
Exception in thread "AWT-EventQueue-1" java.lang.ExceptionInInitializerError
     at app.paint(app.java:8)
     at sun.awt.RepaintArea.paintComponent(Unknown Source)
     at sun.awt.RepaintArea.paint(Unknown Source)
     at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission IMG.gif read)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkRead(Unknown Source)
     at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
     at sun.awt.SunToolkit.getImage(Unknown Source)
     at resource.<clinit>(resource.java:6)
     ... 14 moreAny help is appreciated, guys.

Similar Messages

  • How can I obtain the resources in jar?

    How can I obtain the resources in jar if the class that to want this resource is static?
    I don't succeed use like:
    getClass().getResourceAsStream("/" + name)
    because my class is static.
    Thaks

    You could do this
    new Object().getClass().getResourceAsStream("/" + name)
    or
    Object.class.getResourceAsStream("/" + name)

  • How to obtain the resource context?

    Hi all,
    I'm developing my own object which access the KM repository through the class "ResourceFactory". When I try to get an instance of a resource by method "getResource", a parameter "ResourceContext" is needed. How can I get/create this resourceContext?
    Thx a lot
    Sam

    Hi Detlev,
    Thanks for you kindly help.
    My environment is PDK 5.0, using Eclipse and creating a DynPage (not JSPDynPage). The following is part of my code.
    //code start//
    package PACKAGE_MK_FOLDER_COVER;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.wcm.repository.*;
    import com.sapportals.wcm.util.uri.*;
    import com.sapportals.portal.security.usermanagement.*;
    public class CLASS_MK_FOLDER_COVER extends PageProcessorComponent {
        public void doProcessBeforeOutput() throws PageException {
          Form myForm = this.getForm(); // get the form from DynPage
          // create your GUI here....
          // obtain repository information
          <b>IUser user = (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();</b>
          IResourceContext resourceContext = new ResourceContext(user);
          RID rid = RID.getRID("/documents");
          if (rid != null){
              IResourceFactory resFactory = ResourceFactory.getInstance();
              ICollection myCollection = (ICollection) resFactory.getResource(rid, resourceContext);
    //code end//
    In the bold line, the request has been underlined by the eclipse and with an error message "The field request is not visible".
    Thanks
    Sam

  • Reinitialization of static data by multiple applets

    Hi,
    I have a problem with initialization of shared static data by multiple applets. I have three applets running inside of different HTML frames in a multi-frame HTML framework. Applets are loaded as JAR files. In addition, every applet has one or two 3rd party JARs listed in the APPLET tag. Applets share the same codebase and run inside the same JVM.
    I use static data to perform the inter-applet communication. This is simply a static list of applet references that is being maintained in the base applet class (all applet classes are inherited from that class). The problem is that when applets get constructed, the static data in the base class sometimes gets reinitialized multiple times. As I understand, the static data should be initialized just once on initial load of the base applet class (applets have the same codebase).
    This problem seems to be caused by the race condition (applets initialize on different threads launched by the browser). Under some circumstances (I change the number and order of JARs, etc.) everything works fine. I can reproduce this problem on both Explorer 5.x and Netscape 4.7 (did not try others). I run applets using native browser's JVM.
    Has anybody had such problem before? Is it caused by the large number of JARs ? Is there any way to guarantee that static data will be initialized once in the multi-applet environment ?
    Thanks,
    hparfen

    Hi,
    Did you find something to solve your problem because I have exactly the same.
    Tony

  • How do I grant applets access to local resources?

    Hi:
    I know that for a remotely loaded applet to access local resources the applet must be signed. But, creating a jarfile and signing it for every step in the development is tideous. Is it possible for a locally loaded applet to access local resources without signing the applet?
    Secondly, I found some resources mention that signing is not enough. Is this true? if so, how do I request access to a particular resource?
    Thanks, Erik

    Things work on the command line but fail as applet. I need to figure out why.
    One problem seems that calling applet methods from a java script run on the onload event fail because the applet is not yet initialized. But moving the function to a user initiated event did not solve the problem.
    I need to get access to a smart card reader and load the card, I do really simple stuff: check if the card is inserted and get the length of the ATR code.
    So, there is some missing link and I suspect it may be managing the security parameters. I know about signing but nothing else. What do I need to do to grant my applet access to local resources?
    Thanks, Erik

  • Certificates in lieu of Oracle connection Manager for our Applets -- Help!!

    I support an application named IDEA out of New York. The IDEA application is an INTRANET application for use within our company Firewall.
    Currently, the IDEA application's front end resides on a Windows 2000 Server running IIS 5 and JRun 3.0. The back-end runs on Oracle 8.1.7 database on a UNIX Database Hosting Utility (DHU). Our applets communicate with the back-end database using Oracle Connection Manager that is installed on the Web Host.
    We are trying to migrate to the DWeb environment (Linux cluster). The linux cluster is running Apache Tomcat. We have been told that installing Oracle connection manager is not a viable solution (our company does not support it). Because of this our applets cannot communicate with our database. Below is a brief description of this limitation and also the work-around.
    ====================================================================================================================================================
    Connecting to the Database through the Applet
    The most common task of an applet using the JDBC driver is to connect to and query a database. Because of applet security restrictions, unless particular steps are taken an applet can open TCP/IP sockets only to the host from which it was downloaded (this is the host on which the Web server is running). This means that without these steps, your applet can connect only to a database that is running on the same host as the Web server.
    If your database and Web server are running on the same host, then there is no issue and no special steps are required. You can connect to the database as you would from an application.
    As with connecting from an application, there are two ways in which you can specify the connection information to the driver. You can provide it in the form of host:port:sid or in the form of a TNS keyword-value syntax.
    For example, if the database to which you want to connect resides on host prodHost, at port 1521, and SID ORCL, and you want to connect with user name scott with password tiger, then use either of the two following connect strings:
    using host:port:sid syntax:
    String connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
    conn = DriverManager.getConnection(connString, "scott", "tiger");
    using TNS keyword-value syntax:
    String connString = "jdbc:oracle:thin:@(description=(address_list=
    (address=(protocol=tcp)(port=1521)(host=prodHost)))
    (connect_data=(sid=ORCL)))";
    conn = DriverManager.getConnection(connString, "scott", "tiger");
    If you use the TNS keyword-value pair to specify the connection information to the JDBC Thin driver, then you must declare the protocol as TCP.
    However, a Web server and an Oracle database server both require many resources; you seldom find both servers running on the same machine. Usually, your applet connects to a database on a host other than the one on which the Web server runs. There are two possible ways in which you can work around the security restriction:
    You can connect to the database by using the Oracle8 Connection Manager.
    or:
    You can use a signed applet to connect to the database directly.
    These options are discussed in the next section, "Connecting to a Database on a Different Host Than the Web Server".
    Connecting to a Database on a Different Host Than the Web Server
    If you are connecting to a database on a host other than the one on which the Web server is running, then you must overcome applet security restrictions. You can do this by using either the Oracle8 Connection Manager or signed applets. ====================================================================================================================================================
    It was suggested that we implement signed applets (it is our only alternative at this time). This is where, hopefully, you can help me. We are unfamiliar with using certificates and signing applets. We need to obtain certificates that will allow our applets to connect to our oracle database on the DHU. What kind of certificates do we use? Are their coding examples of how to use these certificates? We have a CA within our company but they cannot tell us what kind of certificates we need. How many certificates do we need? Do we install any certificates on the backend database server? Any information would be greatly appreciated. We are basically trying to get our applet to work outside the sandbox by establishing a connection to the database server.Thanks in advance for your time.

    or:
    You can use a signed applet to connect to the database directly.
    These options are discussed in the next section, "Connecting to a Database on a Different Host Than the Web Server".
    If you want to connect to the database from the applet there is a third option.
    Since this is an intranet application you have control over the desktops using this
    application. In our company the jre ignores signed applets (as it should) because
    it gives control to the user to run potentially harmfull applets from the Internet.
    The way to dish out special privileges to applets is the policy, put a policy file on
    you intranet and have the jre use it by specifying its URL in the java.security.
    Here is some more info about security configuration of the jre:
    http://forum.java.sun.com/thread.jspa?threadID=646161&tstart=45
    reply 3
    We use Oracle jinitiator to run Oracle forms but I am not involved in that project
    and do not know a lot about it. It does perform quite good though.

  • Certificates in lieu of Oracle connection Manager for our Applets

    I support an application named IDEA out of New York. The IDEA application is an INTRANET application for use within our company Firewall.
    Currently, the IDEA application's front end resides on a Windows 2000 Server running IIS 5 and JRun 3.0. The back-end runs on Oracle 8.1.7 database on a UNIX Database Hosting Utility (DHU). Our applets communicate with the back-end database using Oracle Connection Manager that is installed on the Web Host.
    We are trying to migrate to the DWeb environment (Linux cluster). The linux cluster is running Apache Tomcat. We have been told that installing Oracle connection manager is not a viable solution (our company does not support it). Because of this our applets cannot communicate with our database. Below is a brief description of this limitation and also the work-around.
    ====================================================================================================================================================
    [i][i][i]Connecting to the Database through the Applet
    The most common task of an applet using the JDBC driver is to connect to and query a database. Because of applet security restrictions, unless particular steps are taken an applet can open TCP/IP sockets only to the host from which it was downloaded (this is the host on which the Web server is running). This means that without these steps, your applet can connect only to a database that is running on the same host as the Web server.
    If your database and Web server are running on the same host, then there is no issue and no special steps are required. You can connect to the database as you would from an application.
    As with connecting from an application, there are two ways in which you can specify the connection information to the driver. You can provide it in the form of host:port:sid or in the form of a TNS keyword-value syntax.
    For example, if the database to which you want to connect resides on host prodHost, at port 1521, and SID ORCL, and you want to connect with user name scott with password tiger, then use either of the two following connect strings:
    using host:port:sid syntax:
    String connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
    conn = DriverManager.getConnection(connString, "scott", "tiger");
    using TNS keyword-value syntax:
    String connString = "jdbc:oracle:thin:@(description=(address_list=
    (address=(protocol=tcp)(port=1521)(host=prodHost)))
    (connect_data=(sid=ORCL)))";
    conn = DriverManager.getConnection(connString, "scott", "tiger");
    If you use the TNS keyword-value pair to specify the connection information to the JDBC Thin driver, then you must declare the protocol as TCP.
    However, a Web server and an Oracle database server both require many resources; you seldom find both servers running on the same machine. Usually, your applet connects to a database on a host other than the one on which the Web server runs. There are two possible ways in which you can work around the security restriction:
    You can connect to the database by using the Oracle8 Connection Manager.
    or:
    You can use a signed applet to connect to the database directly.
    These options are discussed in the next section, "Connecting to a Database on a Different Host Than the Web Server".
    Connecting to a Database on a Different Host Than the Web Server
    If you are connecting to a database on a host other than the one on which the Web server is running, then you must overcome applet security restrictions. You can do this by using either the Oracle8 Connection Manager or signed applets. ====================================================================================================================================================
    It was suggested that we implement signed applets (it is our only alternative at this time). This is where, hopefully, you can help me. We are unfamiliar with using certificates and signing applets. We need to obtain certificates that will allow our applets to connect to our oracle database on the DHU. What kind of certificates do we use? Are their coding examples of how to use these certificates? We have a CA within our company but they cannot tell us what kind of certificates we need. How many certificates do we need? Do we install any certificates on the backend database server? Any information would be greatly appreciated. We are basically trying to get our applet to work outside the sandbox by establishing a connection to the database server.
    Thanks in advance for your time.

    Eston,
    Have you searched SUN's java Web site? Maybe this article will help:
    http://java.sun.com/developer/technicalArticles/Security/Signed/index.html
    Good Luck,
    Avi.

  • How to call a static method in a class if I have just the object?

    Hello. I have an abstract class A where I have a static method blah(). I have 2 classes that extend class A called B and C. In both classes I override method blah(). I have an array with objects of type B and C.
    For every instance object of the array, I'm trying to call the static method in the corresponding class. For objects of type B I want to call blah() method in B class and for objects of type C I want to call blah() method in C class. I know it's possible to call a static method with the name of the object, too, but for some reason (?) it calls blah() method in class A if I try this.
    So my question is: how do I code this? I guess I need to cast to the class name and then call the method with the class name, but I couldn't do it. I tried to use getClass() method to get the class name and it works, but I didn't know what to do from here...
    So any help would be appreciated. Thank you.

    As somebody already said, to get the behavior you
    want, make the methods non-static.You all asked me why I need that method to be
    static... I'm not surprised to hear this question
    because I asked all my friends before posting here,
    and all of them asked me this... It's because some
    complicated reasons, I doubt it.
    the application I'm writing is
    quite big...Irrelevant.
    Umm... So what you're saying is there is no way to do
    this with that method being static? The behavior you describe cannot be obtained with only static methods in Java. You'd have to explicitly determine the class and then explicitly call the correct class' method.

  • Error Message in Applet

    Does anyone know what could cause the following error message?
    I have tried putting "System.err.println("Test");" into my code, so that when I run it in TextPad I can see what is going on. However, even if I put it as the first line of init, nothing appears!
    Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:666)
    at sun.applet.AppletPanel.init(AppletPanel.java:182)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:80)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1062)
    at sun.applet.AppletViewer.parse(AppletViewer.java:996)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)
    Any suggestions would be much appreciated.
    JB

    It is because you have in html applet tag parameter "with" or "height" set to xx% and it should be set to exact value when you run applet in appletviewer.

  • JDBC in applet URGENT

    Hi,
    I have created an application by using JDBC,now i would like to convert this application into applet and put it online. So i register a domain name, create a jar file for this application and use browser to load it. But so far from what i know, online features have to be done by using JSP,so is it possible to use JDBC to connect to database and do functions online?If not,it means i have to replace JDBC by JSP?
    Thanks for any help.

    Hi
    Please make note of some points:
    1. You can very well create your application as an Applet and then connect to a database through JDBC.
    2. If you think you can make use of the server resources properly you can go ahead with your applet. Otherwise you can switch to JSP, but you may not get any useful resources like Swing, JFC and other stuff through plain jsp, for all these you need an applet as a container for these.
    The problems you are facing is because applets are not secure, you need to sign your applet so as to make use of the system resources available and the applet to interact with your client machines. when you create your jar file you have to sign it using the jarsigner bound to a security certificate installed. Through java you can create your own self signed certificate with the keytool option available in your jdk. Then you have to use the HTMLConverter and pass the HTML file containing the applet tags pointing to your class file, this will convert the applet into browser readable format. Then you are all set, open the applet through your browser and <b>BINGO</b> you are up and moving.
    If you have any more doubts please feel free to ask me.
    Thanks
    Swaraj

  • A new webcam with applets  problems

    hi
    I have some doubt abot webcam with applets
    here are my questions......
    1. There is client(s) and server systems.....
    webcam is connected to clientside and image from webcam should be captured from
    client(s) and to be sent to server ,through web only. Is there are any possibilities to do this
    thing without applets..?
    if so please tell me abt that..
    2. with applets is there any methods to access client webcam without using signed aplets and
    certificating (IE such as setting browser are some settings allow all applets in client machine .etc)
    3. i heard about we can have our own signature and certificates (without aproved by any CA)
    is it possible if so how can we achive that..?
    Im a student doing my projects,I have gone through several applets and webcam related JMF forums but all are old dated and may be new technologies arrived and I couldnot able make clear my doubts comfortably...
    sorry for rising old topic but
    it wold be gracefull if anybody clear my doubts please kindly give me the ans.
    thanks in advance

    Hi
    Let me take a crack at this, :)
    1) No
    2)Anything that is required to access anything of a clients computer, i.e com ports,files and resources needs a signed applet.
    3)http://java.sun.com/developer/technicalArticles/Security/Signed/
    And yes you have to work with
    http://java.sun.com/products/java-media/jmf/
    in order to capture images
    HTH
    :)

  • Anyone seen this error before in Applet Viewer?

    I was trying to run an application that runs fine in a web browser but this is what happens if I try to run it using the AppletViewer.
    This is how I was running the program:
    C:\AppletViewer MyApp.htm
    Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:701)
    at sun.applet.AppletPanel.init(AppletPanel.java:185)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:80)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1062)
    at sun.applet.AppletViewer.parse(AppletViewer.java:996)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)
    Thanks for your help.

    There are bugs about it in the Bug Parade. One of them is http://developer.java.sun.com/developer/bugParade/bugs/4525609.html. The problem appears to be that appletviewer doesn't handle problems in the width/height attributes of the <applet> tag.

  • How to make graphics in Applet not to repaint after I click "refresh"

    Hi, pals
    I have some interactive graphics inside an Applet. User can drag and
    move the graphic objects. The problem is when user click "Refresh"
    button of the web browser, those objects return to their original
    positions. What I hope is to make those objects still lie on the new
    position that user has moved them to after they click "refresh" or
    "back" and "forward" button to return to the applet page.
    do I need to write some thread control?
    Think when you type new URL in the browser showing the applet and go to the new web page. The system will call
    Applet.stop() and destory() to destroy the applet resource used by the
    Applet webpage. When you go back to the applet page, the system will
    call Applet.init() and start() to recreate it. All previous object
    positions and states manipulated by user will return to original.
    For example, there's a circle centered at (50,50), you move it to
    center (100,100). Then you go to another webpage in the same web
    browser frame. When you use "Back" button to return to the Applet, the
    circle will be redraw at center (50,50). (why? because the browser call applet.init() and do all process as first time the applet download to your computer) What I hope is the circle still keeps
    at its last center (100,100) . This seems impossible to me
    since the applet has lost its memory about the center position
    (100,100) last time when you go to another page and the system call
    destory() to delete the applet.
    Any suggestion?

    I think you can disable page refreshing with javascript, but how, I do not know.
    I wish this is helpfull.
    Ahmad Elsafty

  • Applet access to system Clipboard

    Hi all:
    I am creating a customized version of the mud telnet application for a customer. They have requested cut/paste functionality and I have been able to provide this capability. The problem is the applet cannot get access to the system clipboard so all cut/paste functions can only occur within the applet. I am able to access the system clipboard by creating a java.policy file and setting a permission. The problem is that most of the workstations, and a good number that will be using home computers running Win 98. They don't want the users to have to download the new JRE from Sun (although I know this works). I am looking for a way to creat a JAR file using the old JDK 1.1 (or the current toolkit if it is possible) that will allow access from the Applet to the System Clipboard. I have search the web for an answer, with no success. Can anyone give me any suggestions?
    Anybody had to do the same thing before?
    Thanks.
    John Kreiner

    I know this is an old thread, but I thought I would answer it.
    To access the clipboard via an applet, you need to use JavaScript.
    The first thing to do is to create a class that uses reflection to use the JSObject. The reason why reflection is used is because it is a pain (ITA) to specify a compatible binary for eacy java version (e.g. java40.jar, plugin.jar, jaws.jar, etc). Here is the class:
    import java.lang.reflect.*;
    import java.applet.Applet;
    public class JavaScript {
         public static void call(Applet applet, String methodName, Object[] param) {
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method callMethod = js.getMethod("call", new Class[] { String.class, Object[].class });
                   callMethod.invoke(getWindow(applet), new Object[] { methodName, param});
              } catch (Throwable t) {}
         public static Object getWindow(Applet applet) {
              Object o = null;
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method getWindowMethod = js.getMethod("getWindow", new Class[] { Applet.class });
                   o = getWindowMethod.invoke(null, new Object[] { applet });
              } catch (Throwable t) {}
              return o;
    }Now, when you want to copy something to the clipboard, you will do:
    JavaScript.call(someApplet, "copyToClipboard", text);
    BUT the "copyToClipboard" function has not been defined yet. This will be a JavaScript function in the html:
    <script language="JavaScript1.1">
    function copyToClipboard(text) {
         document.myForm.myInput.value = text;
         var rng = document.myForm.myInput.createTextRange();
         rng.execCommand("RemoveFormat");
         rng.execCommand("Copy");
    </script>And one last thing is that a JavaScript text component is required in order to create the "rng" variable. To do this, use a hidden field in the html:
    <form name="myForm">
         <input name="myInput" type="hidden">
         </input>
    </form>

  • Resource.adapters attribute

    The IDM documentation states you must add your new custom resource to the waveset.properties file in $WSHOME/config. It states it must be placed under the resource.adapters entry or it will not be recognized.
    However, when I look through the Waveset.properties file, the only mention of "resource.adapters" is in a comment area for ResourceManagerVersion:
    # ResourceManagerVersion
    # Specifies the version of the Resource Manager to be used. The
    # Resource Manager controls the list of available resources.
    # Additional resources are specified in the resource.adapters
    # attribute above.
    However, there is NO resource.adapters attribute in this file. Is there a sample of how this attribute needs to be formatted and the syntax one should use?

    Here's the context diff of the changes I made to AIXResourceAdapter:
    $ diff -c AIXResourceAdapter.java  MyAIXResourceAdapter.java
    *** AIXResourceAdapter.java     Thu Jul 21 12:14:38 2005
    --- MyAIXResourceAdapter.java   Thu Jul 21 12:33:27 2005
    *** 46,58 ****
       * Resource adapter supporting AIX version 4.3 (and possibly other versions)
       * by using shell script commands through a scripted connection.
    ! public class AIXResourceAdapter
          extends UnixResourceAdapter
          implements Constants {
    !     public static final String code_id = "$Id: AIXResourceAdapter.java,v 1.2.6
    .2 2005/04/08 04:42:54 rsanchez Exp $";
    !     private static final String CLASS = "com.waveset.adapter.AIXResourceAdapte
    r";
          // Resource attribute name of the host used to communicate with the
          // resource.
    --- 46,58 ----
       * Resource adapter supporting AIX version 4.3 (and possibly other versions)
       * by using shell script commands through a scripted connection.
    ! public class MyAIXResourceAdapter
          extends UnixResourceAdapter
          implements Constants {
    !     public static final String code_id = "$Id: MyAIXResourceAdapter.java,v 1.2
    .6.2 2005/04/08 04:42:54 rsanchez Exp $";
    !     private static final String CLASS = "com.waveset.adapter.MyAIXResourceAdap
    ter";
          // Resource attribute name of the host used to communicate with the
          // resource.
    *** 147,154 ****
          // Prototype xml for resource.
          static final String prototypeXml =
    !         "<Resource name='AIX' class='com.waveset.adapter.AIXResourceAdapter'"
    !             + " typeString='AIX' typeDisplayString='"+RAMessages.RESTYPE_AIX+"
    ' supportsScanning ='true'>\n"
                  + "  <ResourceAttributes>\n"
                  + "    <ResourceAttribute name='"+RA_HOST+"' displayName='"+RAMess
    ages.RESATTR_HOST+"' type='string' multi='false'"
                  + " description='" + RAMessages.RESATTR_HELP_115 + "'>\n"
    --- 147,154 ----
          // Prototype xml for resource.
          static final String prototypeXml =
    !         "<Resource name='MyAIX' class='com.waveset.adapter.MyAIXResourceAdapte
    r'"
    !             + " typeString='MyAIX' typeDisplayString='My AIX' supportsScanning
    ='true'>\n"
                  + "  <ResourceAttributes>\n"
                  + "    <ResourceAttribute name='"+RA_HOST+"' displayName='"+RAMess
    ages.RESATTR_HOST+"' type='string' multi='false'"
                  + " description='" + RAMessages.RESATTR_HELP_115 + "'>\n"
    *** 311,324 ****
           *  No argument constructor.
    !     public AIXResourceAdapter() {
              super();
           *  Constructor
    !     public AIXResourceAdapter(Resource res, ObjectCache cache) {
              super(res, cache);
    $
           *  No argument constructor.
    !     public MyAIXResourceAdapter() {
              super();
           *  Constructor
    !     public MyAIXResourceAdapter(Resource res, ObjectCache cache) {
              super(res, cache);
    *** 3886,3898 ****
              private ArrayList _userList;
              private int _userIndex = 0;
              private String _error = "";
    !         private AIXResourceAdapter _adapter = null;
              private ScriptToken.Capture _blockCaptureToken = rootPromptCaptureToke
    n;
              private final int USERSTOITER = 20;
    !          * @deprecated Use BlockAcctIter(AIXResourceAdapter, CaptureList) inst
    ead.
              public BlockAcctIter(int blockSize, CaptureList captureList)
                  throws WavesetException
    --- 3886,3898 ----
              private ArrayList _userList;
              private int _userIndex = 0;
              private String _error = "";
    !         private MyAIXResourceAdapter _adapter = null;
              private ScriptToken.Capture _blockCaptureToken = rootPromptCaptureToke
    n;
              private final int USERSTOITER = 20;
    !          * @deprecated Use BlockAcctIter(MyAIXResourceAdapter, CaptureList) in
    stead.
              public BlockAcctIter(int blockSize, CaptureList captureList)
                  throws WavesetException
    *** 3904,3910 ****
                  start();
    !         public BlockAcctIter(AIXResourceAdapter adapter,
                                   CaptureList captureList)
                  throws WavesetException
    --- 3904,3910 ----
                  start();
    !         public BlockAcctIter(MyAIXResourceAdapter adapter,
                                   CaptureList captureList)
                  throws WavesetException
              {

Maybe you are looking for