Bug: JVMTI's NativeMethodBind never called for Class.getSuperclass() method

This issue is specific to the JRockit JVM only, since it doesnt occur in the HotSpotVM.
The JRockit JVM version is:
jrockit-jdk1.6.0_29-R28.2.0-4.1.0
I am using the JVMTI's NativeMethodBind function to instrument the getSuperClass() method.
However, it seems all the other native methods of java.lang.Class are indeed passed through the NativeMethodBind event, except for getSuperClass().
Here is a bit of code:
void JNICALL
NativeMethodBind(jvmtiEnv *jvmti_env,
                    JNIEnv* jni_env,
                    jthread thread,
                    jmethodID method,
                    void* address,
                    void** new_address_ptr)
     jvmtiPhase phase;
     jvmtiError status=jvmti_env->GetPhase(&phase);
     if((phase==JVMTI_PHASE_PRIMORDIAL) || (phase== JVMTI_PHASE_ONLOAD))
//store method info in vectors
          nativeMethodIdVector.push_back(method);
          nativeMethodAddressVector.push_back(address);
          return;
     if(!nativeBound)
          if(!checkedNativeList)
               checkedNativeList= true;
               if(doCheckNativeList(jvmti_env))
                    nativeBound = true;
                    return;
          char * name;
          char* sig;
          char* genericP;
          jvmtiError status= jvmti_env->GetMethodName(method,&name,&sig,&genericP);
          const char* a = name;
          printf("%s\n",a);
bool doCheckNativeList(jvmtiEnv *jvmti_env)
     bool foundSuperClassMethod = false;
     for(std::vector<int>::size_type i = 0; i != nativeMethodIdVector.size(); i++)
          jmethodID currentmethodid= nativeMethodIdVector;
          void* currentmethodAddress= nativeMethodAddressVector[i];
          char * name;
          char* sig;
          char* genericP;
          jvmti_env->GetMethodName(currentmethodid,&name,&sig,&genericP);
          const char* a = name;
          printf("%s\n",a);
     return foundSuperClassMethod;
The output of this is the following. Note that even though methods like Class.forName0() are included, getSuperclass() is not
debuggerEvent
enterExceptionHandler
generateVirtualCode
generateFixedCode
throwPendingType
registerNatives
initializeClass
fillInStackTrace0
registerNatives
currentTimeMillis
nanoTime
registerNatives
start0
stop0
isAlive
suspend0
resume0
setPriority0
yield
sleep
currentThread
countStackFrames
interrupt0
isInterrupted
holdsLock
getThreads
dumpThreads
registerNatives
getName0
getInterfaces
getSigners
setSigners
getModifiers
getDeclaredFields0
getDeclaredMethods0
getDeclaredConstructors0
getProtectionDomain0
setProtectionDomain0
getDeclaredClasses0
getDeclaringClass
getGenericSignature
getRawAnnotations
getConstantPool
desiredAssertionStatus0
getEnclosingMethod0
getPrimitiveClass
getStackAccessControlContext
getCallerClass
initProperties
initialize
getFileSystem
initIDs
initIDs
registerNatives
retrieveDirectives
getPrimitiveHashCode0
forName0
intern0
getFieldOffset
getBooleanAttributes
mapLibraryName
canonicalize0
registerFinalizer
load
initIDs
initIDs
set
initIDs
allocLargeObjectOrArray
setIn0
invokeMethod
setOut0
setErr0
findSignal
handle0
setErrorMode
open
readBytesPinned
available
isJDK15OrBetter
getNewTla
initNative
close0
list
canonicalizeWithPrefix0
getFinalizeeArraySize
waitForFinalizees
waitForActivatedQueue
findLoadedClass0
isRetransformClassesSupported0
availableProcessors
delete0
VMSupportsCS8
checkIfThreadOwnsLock
convertThinLockedToFatLocked
waitForNotifySignal
throwException
clone0
find
getVersion0
initOptionalSupportFields
getStartupTime
getVmArguments0
maxMemory
getSystemTimeZoneID
getLength
getClassContext
initIDs
open
length
seek
writeBytesPinned
initIDs
initIDs
initIDs
initIDs
read0
read1
pread0
pread1
readv0
write0
write1
pwrite0
pwrite1
writev0
preClose0
close0
force0
close0
checkAndTransferLazyLocked
checkAndTransferLazyLocked
finalize
getUTF8At0
getIntAt0
defineClass0
runClinit
initIDs
init
deflateBytes
defineClass0
end
init
inflateFast
latestUserDefinedLoader
end
park0
park0
park0
park0
setHasRetransformableTransformers
getAllLoadedClasses0
retransformClasses0
unpark0
yield
sleep
options
init
classID
stackTraceID
threadID
rotate
shutdown
start
stop
onCloneRecording
onStartRecording
onStopRecording
add
remove
buffer
flush
write
setEnabled
setThreshold
setPeriod
getPeriod
descriptors
addConstPool
removeConstPool
storeConstPool
getSystemPackage0
defineClass1
hasStaticInitializer
d2i
open
close0
Edited by: user11362013 on Jan 11, 2012 4:56 PM
Edited by: user11362013 on Jan 11, 2012 4:57 PM
Edited by: user11362013 on Jan 11, 2012 4:58 PM

Can somebody please look at this. The formatting options in the forum dont seem to support code styles.
I am willing to provide more samples or a full on reproducible code zip if somebody is willing to take a look at this.
This issue is really hampering our development.

Similar Messages

  • Calling a class's method from another class

    Hi, i would like to know if it's possible to call a Class's method and get it's return from another Class. This first Class doesn't extend the second. I've got a Choice on this first class and depending on what is selected, i want to draw a image on the second class witch is a Panel extended. I put the control "if" on the paint() method of the second class witch is called from the first by the repaint() (first_class.repaint()) on itemStateChanged(). Thankx 4 your help. I'm stuck with this.This program is for my postgraduation final project and i'm very late....

    import java.awt.*;
    import java.sql.*;
    * This type was generated by a SmartGuide.
    class Test extends Frame {
         private java.awt.Panel ivjComboPane = null;
         private java.awt.Panel ivjContentsPane = null;
         IvjEventHandler ivjEventHandler = new IvjEventHandler();
         private Combobox ivjCombobox1 = null;
    class IvjEventHandler implements java.awt.event.WindowListener {
              public void windowActivated(java.awt.event.WindowEvent e) {};
              public void windowClosed(java.awt.event.WindowEvent e) {};
              public void windowClosing(java.awt.event.WindowEvent e) {
                   if (e.getSource() == Test.this)
                        connEtoC1(e);
              public void windowDeactivated(java.awt.event.WindowEvent e) {};
              public void windowDeiconified(java.awt.event.WindowEvent e) {};
              public void windowIconified(java.awt.event.WindowEvent e) {};
              public void windowOpened(java.awt.event.WindowEvent e) {};
         private Panel ivjPanel1 = null;
    * Combo constructor comment.
    public Test() {
         super();
         initialize();
    * Combo constructor comment.
    * @param title java.lang.String
    public Test(String title) {
         super(title);
    * Insert the method's description here.
    * Creation date: (11/16/2001 7:48:51 PM)
    * @param s java.lang.String
    public void conexao(String s) {
         try {
              Class.forName("oracle.jdbc.driver.OracleDriver");
              String url = "jdbc:oracle:thin:system/[email protected]:1521:puc";
              Connection db = DriverManager.getConnection(url);
              //String sql_str = "SELECT * FROM referencia";
              Statement sq_stmt = db.createStatement();
              ResultSet rs = sq_stmt.executeQuery(s);
              ivjCombobox1.addItem("");
              while (rs.next()) {
                   String dt = rs.getString(1);
                   ivjCombobox1.addItem(dt);
              db.close();
         } catch (SQLException e) {
              System.out.println("Erro sql" + e);
         } catch (ClassNotFoundException cnf) {
    * connEtoC1: (Combo.window.windowClosing(java.awt.event.WindowEvent) --> Combo.dispose()V)
    * @param arg1 java.awt.event.WindowEvent
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void connEtoC1(java.awt.event.WindowEvent arg1) {
         try {
              // user code begin {1}
              // user code end
              this.dispose();
              // user code begin {2}
              // user code end
         } catch (java.lang.Throwable ivjExc) {
              // user code begin {3}
              // user code end
              handleException(ivjExc);
    * Return the Combobox1 property value.
    * @return Combobox
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private Combobox getCombobox1() {
         if (ivjCombobox1 == null) {
              try {
                   ivjCombobox1 = new Combobox();
                   ivjCombobox1.setName("Combobox1");
                   ivjCombobox1.setLocation(30, 30);
                   // user code begin {1}
                   this.conexao("select * from referencia");
                   // user code end
              } catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
         return ivjCombobox1;
    * Return the ComboPane property value.
    * @return java.awt.Panel
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private java.awt.Panel getComboPane() {
         if (ivjComboPane == null) {
              try {
                   ivjComboPane = new java.awt.Panel();
                   ivjComboPane.setName("ComboPane");
                   ivjComboPane.setLayout(null);
                   getComboPane().add(getCombobox1(), getCombobox1().getName());
                   getComboPane().add(getPanel1(), getPanel1().getName());
                   // user code begin {1}
                   // user code end
              } catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
         return ivjComboPane;
    * Return the ContentsPane property value.
    * @return java.awt.Panel
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private java.awt.Panel getContentsPane() {
         if (ivjContentsPane == null) {
              try {
                   ivjContentsPane = new java.awt.Panel();
                   ivjContentsPane.setName("ContentsPane");
                   ivjContentsPane.setLayout(new java.awt.BorderLayout());
                   getContentsPane().add(getComboPane(), "Center");
                   // user code begin {1}
                   // user code end
              } catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
         return ivjContentsPane;
    * Return the Panel1 property value.
    * @return Panel
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private Panel getPanel1() {
         if (ivjPanel1 == null) {
              try {
                   ivjPanel1 = new Panel();
                   ivjPanel1.setName("Panel1");
                   ivjPanel1.setBackground(java.awt.SystemColor.scrollbar);
                   ivjPanel1.setBounds(24, 118, 244, 154);
                   // user code begin {1}
                   // user code end
              } catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
         return ivjPanel1;
    * Called whenever the part throws an exception.
    * @param exception java.lang.Throwable
    private void handleException(java.lang.Throwable exception) {
         /* Uncomment the following lines to print uncaught exceptions to stdout */
         // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
         // exception.printStackTrace(System.out);
    * Initializes connections
    * @exception java.lang.Exception The exception description.
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void initConnections() throws java.lang.Exception {
         // user code begin {1}
         // user code end
         this.addWindowListener(ivjEventHandler);
    * Initialize the class.
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void initialize() {
         try {
              // user code begin {1}
              // user code end
              setName("Combo");
              setLayout(new java.awt.BorderLayout());
              setSize(460, 300);
              setTitle("Combo");
              add(getContentsPane(), "Center");
              initConnections();
         } catch (java.lang.Throwable ivjExc) {
              handleException(ivjExc);
         // user code begin {2}
         // user code end
    * Insert the method's description here.
    * Creation date: (11/17/2001 2:02:58 PM)
    * @return java.lang.String
    public String readCombo() {
         String dado = ivjCombobox1.getSelectedItem();
         return dado;
    * Starts the application.
    * @param args an array of command-line arguments
    public static void main(java.lang.String[] args) {
         try {
              /* Create the frame */
              Test aTest = new Test();
              /* Add a windowListener for the windowClosedEvent */
              aTest.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowClosed(java.awt.event.WindowEvent e) {
                        System.exit(0);
              aTest.setVisible(true);
         } catch (Throwable exception) {
              System.err.println("Exception occurred in main() of Test");
              exception.printStackTrace(System.out);
    * Insert the type's description here.
    * Creation date: (11/17/2001 1:59:15 PM)
    * @author:
    class Combobox extends java.awt.Choice {
         public java.lang.String dado;
    * Combobox constructor comment.
    public Combobox() {
         super();
         initialize();
    * Called whenever the part throws an exception.
    * @param exception java.lang.Throwable
    private void handleException(java.lang.Throwable exception) {
         /* Uncomment the following lines to print uncaught exceptions to stdout */
         // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
         // exception.printStackTrace(System.out);
    * Initialize the class.
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void initialize() {
         try {
              // user code begin {1}
              // user code end
              setName("Combobox");
              setSize(133, 23);
         } catch (java.lang.Throwable ivjExc) {
              handleException(ivjExc);
         // user code begin {2}
         // user code end
    * main entrypoint - starts the part when it is run as an application
    * @param args java.lang.String[]
    public static void main(java.lang.String[] args) {
         try {
              java.awt.Frame frame = new java.awt.Frame();
              Combobox aCombobox;
              aCombobox = new Combobox();
              frame.add("Center", aCombobox);
              frame.setSize(aCombobox.getSize());
              frame.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
              frame.setVisible(true);
         } catch (Throwable exception) {
              System.err.println("Exception occurred in main() of Combobox");
              exception.printStackTrace(System.out);
    * Insert the type's description here.
    * Creation date: (11/17/2001 2:16:11 PM)
    * @author:
    class Panel extends java.awt.Panel {
    * Panel constructor comment.
    public Panel() {
         super();
         initialize();
    * Panel constructor comment.
    * @param layout java.awt.LayoutManager
    public Panel(java.awt.LayoutManager layout) {
         super(layout);
    * Called whenever the part throws an exception.
    * @param exception java.lang.Throwable
    private void handleException(java.lang.Throwable exception) {
         /* Uncomment the following lines to print uncaught exceptions to stdout */
         // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
         // exception.printStackTrace(System.out);
    * Initialize the class.
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void initialize() {
         try {
              // user code begin {1}
              // user code end
              setName("Panel");
              setLayout(null);
              setSize(260, 127);
         } catch (java.lang.Throwable ivjExc) {
              handleException(ivjExc);
         // user code begin {2}
         // user code end
    * main entrypoint - starts the part when it is run as an application
    * @param args java.lang.String[]
    public static void main(java.lang.String[] args) {
         try {
              java.awt.Frame frame = new java.awt.Frame();
              Panel aPanel;
              aPanel = new Panel();
              frame.add("Center", aPanel);
              frame.setSize(aPanel.getSize());
              frame.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
              frame.setVisible(true);
         } catch (Throwable exception) {
              System.err.println("Exception occurred in main() of java.awt.Panel");
              exception.printStackTrace(System.out);
    * Insert the method's description here.
    * Creation date: (11/17/2001 2:18:36 PM)
    public void paint(Graphics g) {
    /* Here's the error:
    C:\Test.java:389: non-static method readCombo() cannot be referenced from a static context
         System.out.println(Test.lerCombo());*/
         System.out.println(Test.readCombo());

  • Call Java Class and Methods from ABAP

    Hi
    I install de JCo, But how i can call java class and methods from ABAP?. somebody has an example?
    The tutorial say that's is possible,  but don't explain how do that?
    Thanks.
    Angel G. Hurtado

    If you need only simple java program, you do not need to install JCo. The following codes can call java class.
    DATA: COMMAND TYPE STRING VALUE 'C:\j2sdk1.4.2_08\bin\java',
          DIR TYPE STRING VALUE D:\eclipse\workspace',
          PARAMETER TYPE STRING VALUE 'Helloworld'. "here the name of your java program
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
       EXPORTING
         APPLICATION = COMMAND
         PARAMETER = PARAMETER
         DEFAULT_DIRECTORY = DIR
       MAXIMIZED =
         MINIMIZED = 'X'     "If you need the DOS window to be minimized
      EXCEPTIONS
        CNTL_ERROR = 1
        ERROR_NO_GUI = 2
        BAD_PARAMETER = 3
        FILE_NOT_FOUND = 4
        PATH_NOT_FOUND = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED = 7
        OTHERS = 8.
    Tell me if it works.
    Nuno.

  • Problem calling AS3 class's methods from Flex Project

    Sorry if this is a stupid question, but after 2 days of Web
    searching and 2 books give up; I am a Java and c# programmer and am
    having problems calling AS3 classes (in packages) from Flex Builder
    2 Flex Projects; the AS3 classes work great as Flex Builder "AS3
    Projects", but when I try to use the classes in a Flex Builder
    "Flex Project" I am able to see and set their properties, but
    cannot see (through "code completion") their methods (unless the
    class extends another AS3 class; and in that case I can see the
    base class's methods). Here is the code:
    AS3 Example Class:
    package asText {
    public class CheckWord {
    public var strData:String;
    public var strAProperty:String;
    public var intAProperty:int;
    // Constructor
    public function CheckWord() {
    public function TestMethod():void {
    trace("test...");
    public function WordLength():int {
    var intLength:int = 0;
    trace(strData);
    intLength = strData.length;
    return intLength;
    } // From Method WordLength
    } // From Class CheckWord
    } // From Package asText
    The MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    width="442" height="488" horizontalAlign="center"
    verticalAlign="middle"
    backgroundGradientColors="[#c0c0c0, #c0c0c0]"
    xmlns:asTheText="asText.*"
    >
    <asTheText:CheckWord strData="Test words" />
    <mx:Panel title="Welcome to ........" width="337"
    height="393" horizontalAlign="center" verticalAlign="middle"
    layout="absolute" y="15" x="50">
    <mx:Text text="First Name" enabled="true" width="68"
    fontWeight="bold" x="27.25" y="36"/>
    <mx:TextInput id="txtFName" x="112.25" y="34"/>
    <mx:Text text="Last Name" enabled="true" width="68"
    fontWeight="bold" x="27.25" y="66"/>
    <mx:TextInput x="112.25" y="64" id="txtLName"/>
    <mx:Text text="email address" enabled="true" width="87"
    fontWeight="bold" x="17.25" y="96"/>
    <mx:TextInput width="189" id="txtEmail" left="112.25"
    top="94"/>
    <mx:Button id="butSubmit" label="Submit" x="95" y="194"
    click="asTheText:TestMethod();"/>
    ..............and so on ............
    All this does is give me an 1180 error:
    1180: Call to a possibly undefined method TestMethod.
    flexConveyMovie1.mxml

    Thanks, I have it working; I was not assigning an "ID" to the
    "MXML use of the class" (whatever the formal name for that is;
    like: <asTheText:CheckWord id="MyText" strData="The Data" />
    ) and then I was not referencing that ID in what I am refering to
    as calling methods for the Class; like:
    <mx:Button id="butTest" label="Test Function" x="39"
    y="208" click="MyText.TestMethod();"/>
    Also, I did some tests on this, and I am shocked that
    apparently neither of these two "uses"(?) of a custom AS3 class
    actually "call" the Class's constructor. Does that make sense or is
    that the result of how I am structuring this?
    Phil

  • BUG: Return listener not being called for manually launched dialog

    Hello all,
    I have found a bug in the dialog framework. To set the stage, I have a ADF Faces page with a command button on it. The partial submit property is set to "true" and the use window property is also set to "true." I also have the returnListener property set to a method in the backing bean. When I set the Action property of the command button to a global navigation rule that launches a dialog, the return listener is being called correctly when I dismiss the dialog.
    However, when I launch the dialog from an action listener, the return listener is not being called. Here is my action listener code:
      public void al (ActionEvent ae)
        FacesContext context = FacesContext.getCurrentInstance();
        ViewHandler vh = context.getApplication().getViewHandler();
        UIViewRoot dialog = vh.createView(context, "/infrastructure/ICConfirmDelete.jspx");
        HashMap properties = new HashMap();
        properties.put("width", new Integer(300));
        properties.put("height", new Integer(300));
        AdfFacesContext.getCurrentInstance().launchDialog(dialog, null, ae.getComponent(), true, properties);
      }and here is my return listener:
      public void rl(ReturnEvent re)
        System.out.println("in return");
        System.out.println((String) re.getReturnValue());
      }OK - here's an update. If the command button is in the Actions facet of the page, everything works as expected. However, if the button is in the selection facet of a table (inside of afTableSelectOne) - it does not work properly as documented here. It also works correctly if the button is in the actions facet of the table. I think that this is a bug and needs to work - my use case (as you might tell from my code) is to do a delete confirmation dialog. My short-term workaround is to use the Action instead of ActionListener property on the command button, but the issue I have is that the pop-up dialog is just a tad too small, and is showing scrollbars.
    Regards,
    John
    Message was edited by:
    John Stegeman
    Added additional information about tableSelectOne

    Gabrielle,
    Sorry for the confusion.
    What does not work:
    Initiating a dialog from the ActionListener attached to a command button (where the command button is inside an afSelectTableOne) will not fire the returnListener when the dialog is closed.
    What does work:
    Initiating a dialog by returning a dialog-based navigation rule (e.g. a string starting with "dialog:") from the Action attached to a command button (even if the command button is inside an afSelectTableOne) - the return listener is called when the dialog is closed
    What also does work:
    Initiating a dialog with either method (Action or ActionListener) when the command button is elsewhere on the Page (e.g. in the Actions facet)
    Hope this clarifies the bug. I could send a test case if desired.
    Kind regards,
    John

  • Searching for class or method to add mobile components programatically

    Hello,
    I'm searching for a class and/or a method to add a mobile component and version to a mobile device programatically.
    Furthermore I would like to know in which datbase-table I can find
    a) The roles and their mobile components
    b) The installed components of the registered devices.
    I Hope you can help me with this issue.
    Best regards.
    Lars

    Hello,
    thanks for your responses. I think the answer of Shobha is very good. I've found a second solution for this problem.
    1. Set the MCD-Attributes
    DATA: mcd_name TYPE SMMW_MCDNAME,
                mcd_ver    TYPE SMMW_MCDVERSION.
        CLEAR mcd.
                 mcd-MCDNAME = mcd_name.
                 mcd-VERSION   = mcd_ver.
                 APPEND mcd TO mcds.
        CLEAR mcd.
    2. Call method
    CALL METHOD CL_SMMW_DEV_ADM=>ASSIGN_MCD_TO_DEVICE
        EXPORTING
          RECEIVERID                                 = 'Your receiver-ID'
          MCDS                                           = mcds
          AUTO_FLAG                                = 'X'
        INVOKE_RULE_EVALUATION     = 'X'
        IMPORTING
          NON_AVAIL                                 = NON_AVAIL
          FAILED_MCDS                              = FAILED_MCDS
          MESSAGE_RETURN                     = MESSAGE_RETURN
        EXCEPTIONS
          MCDNAME_VERSION_INCOMPLETE = 1
          others                                                = 2.
      IF SY-SUBRC <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    With the method of class CL_SMMW_DEV_ADM you can easily add MCDs to your device.
    Thank you for your help.
    Best regards.
    Lars

  • Calling another class's method

    I realize this is a basic question but I am stumped. I am updating existing code so do not have total freedom. To make my situation simple, I have two classes, say, ComplexDialog1 and ComplexDialog2. Each has a Checkbox. I need to know the States of both Checkboxes from either class. How do I do that? Since these classes are dialogs, I cannot simply instantiate another dialog to gain access to its methods. I thought about casting, something like, (ComplexDialog2)getCheckboxState, (where getCheckBoxState consists of checkbox.getState), but of course that won't compile. A global variable would be great, but those don't exist in Java. Any serious answers will be appreciated.

    know-nothing wrote:
    I realize this is a basic question but I am stumped. I am updating existing code so do not have total freedom. To make my situation simple, I have two classes, say, ComplexDialog1 and ComplexDialog2. Each has a Checkbox. I need to know the States of both Checkboxes from either class. How do I do that? Since these classes are dialogs, I cannot simply instantiate another dialog to gain access to its methods. At any rate this is where the design problem really is. It seems the state of your application is residing partially at least in these GUI classes. Which is wrong. The GUI is for display not for the logic and storing of state of the application. For more on this you should learn about MVC http://en.wikipedia.org/wiki/Model-view-controller
    So how are you going to solve this problem?
    Well the long and probably verbotten way is to fix the design.
    The shorter, possibly (and only in the short term because in the long term the bad design will cost you dearly when it comes to making changes and maintaining this application) allowed method is that you are going to have to have instances of both Dialogs available at the same time in your application. Now as you said they are dialogs so you can't display them both at the same time but you need to display them both. You only need to have them both in existence and then show and hide them as desired.
    This is going to take some code tweaking both inside these classes and with other classes as well. You have no choice in this matter. If you cannot change calling classes then you'll have to give up because it's hopeless.
    You must be able to access one instance from the other (and vice versa) perhaps through the parent class. I don't know what works best for you.

  • TABLE for Class the methods

    Hi ALL,
    Can anyone tell me the DB table where all the Classs and its methods are stored..?
    Also if one could tell me that for any enhancement class implementation where are the OVERWRITE exit methods stored..
    Regards
    Rajivb Kanoria

    Hi Ill give u the complete steps for what im looking for...
    Go to sfw1(switch transaction).
    enter a switch like  MILL_EHP_01A and execute.
    A new transaction in which we get the package for the switch.
    double click on the package name 'MILL_EHP_01A_SWITCH'.
    traverse to Utilities->display_object list.
    u will go to package builder.
    click on dropdown 'enhancement' on the browser window,
    click on 'Enhancement implementations' dropdown.U will get all the implementations name.
    Double click on any one.
    Now in the Right side u will see a class name on the button in the attributes tab.
    click on the overwrite methods tab.
    U will see the overwrite method dere( I want the tables where these methods are stored).
    Click on the button with the class name.GO TO METHODS TAB.
    u will reach the class builder.
    There is a overwrite-EXIT column.
    In that some methods will have a botton for overwrite exit , some will not.
    Where this info is stored about Overwrite Exits./?
    Regards
    Rajiv Kanoria

  • Sample Javadoc comments for classes or methods using generics?

    Can anyone show me a sample Javadoc comment for a class or a method that uses generics. All my attempts so far ended up in warnings from the Javadoc tool..
    I also looked in the Sun forums, in the Javadoc documentation, but nowhere could I find anything that would help me write correct javadoc comments.
    Any luck for you guys?
    Thanks a lot,
    -Laurent

    Thanks man, sorry it must seem obvious to you, but
    for some reason I couldn't get it to work.No. The first time I also had to ask.
    Now an even more difficult (for me) question: how
    would you refer to that method in a @see or {@link
    ..} javadoc comment?Manually erase the method:
    * The see tag refers to this method
    * @param <T> a type variable
    * @see #foo(Object)
    <T> void foo(T t) {}

  • [svn:bz-trunk] 21111: Bug: BLZ-578 - [Coverity] potential race condition for class flex.messaging.MessageBroker

    Revision: 21111
    Revision: 21111
    Author:   [email protected]
    Date:     2011-04-21 06:12:37 -0700 (Thu, 21 Apr 2011)
    Log Message:
    Bug: BLZ-578 - potential race condition for class flex.messaging.MessageBroker
    QA: Yes
    Doc: No
    Details: The bug was fixed by change 19598 already, but also adding a minor fix to not call setSystemSettings in initThreadLocal method becuase there are no thread local variables in MessageBroker anymore.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-578
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/MessageBroker.java

  • Table name for list of methods for given class

    Hi Experts,
      Is there any table where I can get list of methods in the class?
    Req: Input parameter: Class Name
            Output: List of all methods in it
    Note: As we know, we will have different program names and method names for Classes and Methods. I am okay if I can find table which contains method programs for given class program name.
    Regards,
    Naveen Inuganti

    Hi,
    Check table TMDIR.
    Thanks,
    Venkatesh

  • Runtime Analysis For Classes

    Hi All,
    Can we do runtime analysis for Classes and Methods in the same way as program and function module?
    Thanks & Regards,
    Samir

    You can have a look at this thread Transaction SAT - Analyze Performance of Classes in which the OP has written a blog for the question.

  • Discussion -- Call for answers : Class and Component

    Dear all,
    1. Component has a clear seperation between the specification and implementation? I can't understand here.The interface define some operations,but eventually we need coding to realize it. Where is the speration?
    A class also has methods and coding to realize it. But why we never say a class has a seperation between the specification and implementation?
    2. Component has interface; Java has interface. Are they the same idea or different?
    Call for answers.
    Thanks
    Kevin

    Hi, Kevin,
    First of all, I need to clarify some terminologies and then try to anwser your questions.
    (1) Interface only defines operations, but does not specifies how to implement those operations. In Java, abstract class and interface are interfaces. In CORBA, IDL is interface which can be implemented by differenct programming languages.
    (2) Java class is both an interface and an implementation, because it not only defines operations, but also implements the operations.
    (3) Component provides some specific functionalities, but is not a full-featured application. Usually, a full-featured application consists of many different components. A component can be large or small. A component can be as large as consisting of tens or hundreds of interfaces and classes, like EJB container and server. On the other hand, a component can be as small as comprising only one class; suppose you write a component to calculate foreign currancy conversion.
    (4)Specification is a written document that tries to standardize the development of a large component. A specification specififies each party's responsibilities, such as application developers'responsibilities, vendor's responsibilities, administrtor's responsibilities and so on. Also, it specifies the contracts (interfaces) between each party. In doing so, a component can be made very reuseful and can be plug-in and play; changing different vendor's component without breaking application developer's owner code.
    In Java world, you see a lot of specifications, such as JDBC, EJB and JMS. When SUN defines those specifications, they use Java interfaces rather other classes to specify interfaces. Here, clear seperation between interface and implementation is very important. (1) If a class is used to specify an interface, SUN must provide implementation for the class. But, the purpose of the specification to allow different vendors to provide implementation.(2) Implementation details can very complex and different vendors may implement the same component very differently. A specification only specifies interfaces but not the implementation. The implementation is up to the vendors. Any implementation is ok as long as they comply to the contracts (interfaces). For instance, one vendor may implement a specified interface using one class and another vendor may implement the same interface using three classes. If a class is used to specify an interface, you restrict vendors' implementation. Usually, in a specification, if you find a class that is used to defines an interface, it means that SUN will provide common implementation for it and vendors do not need to implement it.
    In OO design and programing, clearly seperating interfaces from implementations is vital. We should program interface rather than program implementation.
    Thanks.
    Tommy

  • Never once has my phone updated without deleting everything. It says "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes. I can't call for help because my phone is frozen on the screen with iTune

    Never once has my phone updated without deleting everything. It says "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes. I can't call for help because my phone is frozen on the screen with iTunes. On line live chat won't chat until I give them my serial number which I can't get to because its frozen and can't call for the same reason!!  Omg!  Someone please help me!?

    Morning AppleHlumamkhululi,
    Thanks for using Apple Support Communities.
    In most cases, the connected iPod needs to be restored.
    For more information on this, take a look at this article:
    iTunes has detected an iPod in recovery mode - Use iTunes to restore
    http://support.apple.com/kb/ts1456
    Best of luck,
    Mario

  • Technician never showed up, never called & now can't come out for 3 more days???

    Yesterday afternoon I lost my TV, phone and internet service (X1 Platform). There were no outages in the area so customer service was called. After spending 45 minutes on the phone going through all the troubleshooting, the rep said a tech would have to come out. She said they could come out the next day, gave us our choice of times and we picked 8:30am-12:30pm. She said the tech would call 30 minutes before he showed up. Today the tech never calls, never shows and my husband stayed home all morning for this. He called customer service and they told him we didn't have an appointment scheduled. I called and was told the same thing and then the rep said in order to make another appointment we would have to do the troubleshooting again. I told her there was no way that was happening. She said she could see that troubleshooting had already been done, but for some reason the last rep never made an appointment for the tech to come out. I asked her if that made any sense at all, that they would just leave the issue unresolved like that. Magically, she suddenly found where the last rep had requested that a truck come out, but she still couldn't find the date and time. Then she tried to find the tech, but she couldn't - apparently he disappeared into a black hole. The rep then tells me I have to set up a new appointment (which she can now suddenly do without troubleshooting) and the earliest available is Sunday from 5-7.  Are you kidding me??? Because either customer service at Comcast or the tech screwed up, my time without service went from 1 day to 4 days??? She said she would make the appointment and then transfer me to a supervisor because only a supervisor is able to change the appointment date. At this point, I've been on the phone for 45 minutes and then I spent an additional 15 minutes waiting for a supervisor. The rep did come back every few minutes and tell me that the line was still busy and she hadn't forgotten about me...until the point where she disconnected me. I know very well that she had my phone number to call back because it's on my account.  Did she? No. So, I called back again. Explained the entire situation to a different rep. She said that a supervisor can't change the appointment time - only a dispatcher can. She took my husband's number and said that a dispatcher would call if a time becomes available for a tech to come out. If none becomes available, we're out of luck until Sunday night. I asked to talk to a supervisor. She had the nerve to ask why. She transferred me to someone who, of course, didn't answer the phone and I got to leave a voice message. That person (whoever it was) hasn't called me back. I don't think it's too much to ask that, when the mistake is Comcast's, you do whatever you can to make it right. It's not as if the tech showed up and nobody was home. My husband sat there for 4 hours waiting. We have also spent a good portion of our day on the phone trying to get someone to come out today or tomorrow at the latest. If I switched to a different company, they would be able to come out before Sunday to install new service, but you can't be bothered to make things right for an existing customer when you screw up.

    Fun update (no, not really). Called back numerous times since my last post with no luck. I'm pretty sure I've talked to every department conceivable at least once to try to get someone at Comcast to live up to the term "customer service" and get someone out to my house ASAP since they were a no-show today. One of the more entertaining conversations was with a supposed supervisor who informed me that she looked at my account and could see where I talked to a rep yesterday about my phone service being out and they had me check for a dial tone. I told her that absolutely never happened - we only tried troubleshooting the error code on the TV. This model employee proceeded to argue with me and kept repeating that we had checked for a dial tone. She refused to stop talking when I tried to correct her and proceeded to talk non-stop for a full minute before I pretty much screamed into the phone that, while we have the phone service, we don't use it, and we don't even have a phone hooked up in the house, so how in the world could we possibly have checked for a dial tone??? If someone isn't out tomorrow to fix this, I'm switching to U-verse. Nobody should be have to deal with customer service that doesn't care about the customer and can't admit to or fix their mistakes. 

Maybe you are looking for

  • Application works in UAT but gives an error while deploying in Production m

    Error occured while deploying MYApp.ear on production domain. but the same is working fine in UAT below error occured... <Apr 12, 2010 3:55:50 PM IST> <Error> <Deployer> <BEA-149205> <Failed to initial ize the application 'MYApp' due to error java.la

  • Time Constraint Error when calling a Function Module

    Any help will be greatly appreciated - Thanks RM Time Constraint Error Information on where terminated Termination occurred in the ABAP program "SAPUP50R" - in "CHECK_TIME_CONSTRAINT_S1". The main program was "MP000000 ". In the source code you have

  • JTable Column Headings

    While adding a Jtable without a scrollpane, the column headings are not displayed, why?

  • Suggestions for creating LOGOS and GRAPHICS??

    I create logos as kind of a "hobby". I usually use PAGES to create as most are manipulations of fonts, shapes and importing images, etc. I realize I am limited by PAGES in terms of producing high quality images for reproduction. Does anyone have a su

  • Which among the two outbound queues has the highest priority?

    Hi guys, pardon me for the following questinos, im just a newbie in XI/PI. 1. Which among the two outbound queues has the highest priority, XBTA or XBTM? 2. Can someone elaborate more the difference between the Large outbound queue (XBTM) against the