JACOB need to get to methods inside Variant

--------------------my Venice class
package model;
import com.jacob.com.*;
import com.jacob.activeX.*;
public class Venice {
     ActiveXComponent veniceDll = new ActiveXComponent("ClSdk.Venice");
     public Venice() {
     public boolean logonDialog(String version, String appName) {
          return Dispatch.call(veniceDll, "LogonDialog", version, appName).getBoolean();
     public Variant[] getCabinets() {
          return Dispatch.call(veniceDll, "GetCabinets").toSafeArray().toVariantArray();
     public Variant[] getDossiers(String cabinet) {
          Variant[] dossiers = Dispatch.call(veniceDll, "GetDossiers", cabinet).toSafeArray().toVariantArray();
          return dossiers;
------------------------------my class with main method
public class Test {
     public static void main(String[] args)
          Venice venice = new Venice();
          venice.logonDialog("7.40a", "sdk");
          Variant[] cabinets = venice.getCabinets();
          for (Variant cabinet : cabinets) {
               System.out.println(cabinet.toString());
          Variant[] dossiers = venice.getDossiers("\\\\Citrix02\\Venice\\Data\\6_Test");
          for (Variant dossier: dossiers) {
               if (dossier.toString().equalsIgnoreCase("bvm")){
                    //Dispatch.call(dossier.toDispatch(), "AMethod"); <----------------
I want to access the methods from dossier. Using dossier.toDispatch() gives the error:
Exception in thread "main" com.jacob.com.ComFailException: VariantChangeType failed
     at com.jacob.com.Variant.toVariantDispatch(Native Method)
     at com.jacob.com.Variant.toDispatch(Variant.java:1996)
     at model.Test.main(Test.java:28)
Anyone who knows how else I can get to the methods native to dossier?

--------------------my Venice class
package model;
import com.jacob.com.*;
import com.jacob.activeX.*;
public class Venice {
     ActiveXComponent veniceDll = new ActiveXComponent("ClSdk.Venice");
     public Venice() {
     public boolean logonDialog(String version, String appName) {
          return Dispatch.call(veniceDll, "LogonDialog", version, appName).getBoolean();
     public Variant[] getCabinets() {
          return Dispatch.call(veniceDll, "GetCabinets").toSafeArray().toVariantArray();
     public Variant[] getDossiers(String cabinet) {
          Variant[] dossiers = Dispatch.call(veniceDll, "GetDossiers", cabinet).toSafeArray().toVariantArray();
          return dossiers;
------------------------------my class with main method
public class Test {
     public static void main(String[] args)
          Venice venice = new Venice();
          venice.logonDialog("7.40a", "sdk");
          Variant[] cabinets = venice.getCabinets();
          for (Variant cabinet : cabinets) {
               System.out.println(cabinet.toString());
          Variant[] dossiers = venice.getDossiers("\\\\Citrix02\\Venice\\Data\\6_Test");
          for (Variant dossier: dossiers) {
               if (dossier.toString().equalsIgnoreCase("bvm")){
                    //Dispatch.call(dossier.toDispatch(), "AMethod"); <----------------
I want to access the methods from dossier. Using dossier.toDispatch() gives the error:
Exception in thread "main" com.jacob.com.ComFailException: VariantChangeType failed
     at com.jacob.com.Variant.toVariantDispatch(Native Method)
     at com.jacob.com.Variant.toDispatch(Variant.java:1996)
     at model.Test.main(Test.java:28)
Anyone who knows how else I can get to the methods native to dossier?

Similar Messages

  • Need to get  "jButton2" information inside "jButton12"

    At present I am sending two parameters (readXMLfile, changeFilename) from the method "ReadFile" to the class "filesMove". But I need to send these two parameters (readXMLfile, changeFilename) from "private void jButton12ActionPerformed(java.awt.event.ActionEvent evt)". I am unable get "readXMLfile" inside "private void jButton12ActionPerformed(java.awt.event.ActionEvent evt)". Could anyone Please help me with this.
    My code is:
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
         JFileChooser chooser=new JFileChooser();
         chooser.setCurrentDirectory(curfile);
         chooser.setMultiSelectionEnabled(true);
         int state=chooser.showOpenDialog(null);
         File[] files=chooser.getSelectedFiles();
         String[] filenames=getFilenames(files);
         for(int i=0;i<filenames.length;i++)
              try
                   ReadFile(curfile,filenames);
              catch(IOException ex)
                   ex.printStackTrace();
    File curfile=new File("D:/sample/");
    private String[] getFilenames(File[] files)
         String[] filenames=null;
         int numFiles=files.length;
         if(files.length>0)
              filenames=new String[numFiles];
              for(int i=0; i<numFiles;i++)
                   filenames[i]=files[i].getName();
         return filenames;
    private void ReadFile(File readDir, String XMLfile) throws IOException
         File readXMLfile=new File(readDir,XMLfile);
         //output: readXMLfile: D:\sample\ABACE___.ABC
         //output: readXMLfile: D:\sample\ABACE___.DEF
         String changeFilename=jTextField1.getText();
         File dstfile=new File("C:/temp/sample");
         if(!dstfile.exists())
              dstfile.mkdirs();
         if(!rename.equals(""))
              //I am passing (readXMLfile,changeFilename) from here
              filesMove fm=new filesMove();
              try
                   fm.copyDirectory1(readXMLfile,changeFilename);
              catch(IOException e)
                   System.out.println(e.getMessage());
    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt)
         String changeFilename="";
         if((!(jTextField2.getText().toString().equals("")))&&(!(jComboBox1.getSelectedItem().toString().equals("")))&&(!(jComboBox2.getSelectedItem().toString().equals("")))&&(!(jComboBox3.getSelectedItem().toString().equals("")))&&(!(jComboBox4.getSelectedItem().toString().equals("")))&&(!(jComboBox5.getSelectedItem().toString().equals(""))))
              String jTextField2Txt=jTextField2.getText().toString();
              String jComboBox1Text=jComboBox1.getSelectedItem().toString();
              String jComboBox2Text=jComboBox2.getSelectedItem().toString();
              String jComboBox3Text=jComboBox3.getSelectedItem().toString();
              String jComboBox4Text=jComboBox4.getSelectedItem().toString();
              String jComboBox5Text=jComboBox5.getSelectedItem().toString();          
              changeFilename=jTextField2Text+jComboBox1Text+jComboBox2Text+jComboBox3Text+jComboBox4Text+jComboBox5Text;
              jTextField1.setText(changeFilename);
              /* But I need to pass (readXMLfile,changeFilename) from here
              filesMove fm=new filesMove();
              try
                   fm.copyDirectory1(readXMLfile,changeFilename);
              catch(IOException e)
                   System.out.println(e.getMessage());

    My code is:
    public class Main extends javax.swing.JFrame
         /** Creates new form Main */
         private File readXMLfile;
         private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
              readXMLfile=new File(readDir,fileName);     
              //output: readXMLfile: D:\sample\ABACE___.ABC
              //output: readXMLfile: D:\sample\ABACE___.DEF
              //output: readXMLfile: D:\sample\ABACE___.GHI
         private void jButton12ActionPerformed(java.awt.event.ActionEvent evt)
              else if(!(jComboBox5.getSelectedItem().toString().equals("")))
                   String jComboBox5Txt=jComboBox5.getSelectedItem().toString();
                   String jComboBox5Text=jComboBox5Txt.substring(0,1);
                   changeFilename=jComboBox1Text+jTextField2Text+jComboBox5Text;
              //Its outputting only the last selected file
              System.out.println("readXMLfile: +readXMLfile);     
              //output: readXMLfile: D:\sample\ABACE___.GHI
              String rename=changeFilename+"8a";
              String renameSub=rename.substring(0,3);
              filesMove fm=new filesMove();
              try
                   fm.copyDirectory1(readXMLfile,rename,renameSub);
              catch(IOException e)
                   System.out.println(e.getMessage());
    ======================================================================
    public class filesMove
         static String code="";
         /** Creates a new instance of filesMove */
         public filesMove()
         void copyDirectory1(File readXMLfile, String name, String nameSub) throws IOException
              File dstfile=new File("C:/temp/sample",readXMLfile.getName());                     
              BufferedReader br = null;
              BufferedWriter bw = null;
              String line;
              try
                   br = new BufferedReader(new FileReader(readXMLfile));                              
                   bw = new BufferedWriter(new FileWriter(dstfile));               
                   while((line = br.readLine()) != null)
                        bw.write(line);
                        bw.newLine();
                        bw.flush();
              catch(IOException ioe)
                   System.out.println("The IO Exception Could Be.."+ioe);
              finally
                   try
                        br.close();
                   catch(Exception e)
                   try
                        bw.close();
                   catch(Exception e)
    }

  • Need help getting Main method to work...

    Hello everyone, I have a problem, I have a GUI that I need to run (it compiles fine, but will not run.) I am very new to Java and programing in general so go easy on me. I think I am just missing something simple here. I am going to post the basic code and see if you all can help...the issue is in written in red to help you identify my problem...
    public class LagersGUI extends JFrame implements ActionListener,Serializable
    {color:#0000ff}private {color}JTextArea {color:#339966}textArea{color};
    {color:#0000ff}private {color}JButton {color:#339966}start,
    next,
    previous,
    last;{color}
    JLabel {color:#339966}imageLabel{color};
    {color:#0000ff}private static{color} LagersAddInfo {color:#339966}inv{color} = {color:#0000ff}new {color}LagersAddInfo();
    {color:#808080} /**
    * @param arg0
    * @throws HeadlessException
    */{color}
    {color:#0000ff}public {color}LagersGUI( String arg0 ) {color:#0000ff}throws {color}HeadlessException
    {color:#0000ff}super{color}( {color:#ff9900}"Inventory GUI" {color});
    {color:#339966}textArea{color} = {color:#0000ff}new {color}JTextArea( 800,800 );
    JScrollPane scrollPane = new JScrollPane( {color:#339966}textArea{color} );
    textArea.setEditable( {color:#0000ff}false {color});
    scrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
    scrollPane.setPreferredSize( new Dimension( 600, 100 ) );
    JPanel cp = new JPanel();
    cp.setSize( 400, 100 );
    cp.setLayout( new BorderLayout() );
    cp.add( scrollPane,BorderLayout.{color:#339966}CENTER{color} );
    JPanel buttonPanel = new JPanel();
    JPanel buttonPanel1 = new JPanel();
    {color:#339966}start{color} = new JButton( {color:#ff9900}"Start"{color} );
    {color:#339966}start{color}.addActionListener( {color:#0000ff}this {color});
    {color:#339966} next{color} = new JButton( {color:#ff9900}"Next" {color});
    {color:#339966} next{color}.addActionListener( {color:#0000ff}this {color});
    {color:#339966}previous{color} = new JButton( {color:#ff9900}"Previous"{color} );
    {color:#339966} previous{color}.addActionListener( {color:#0000ff}this {color});
    {color:#339966} last{color} = new JButton({color:#ff9900} "Last"{color} );
    {color:#339966} last{color}.addActionListener( {color:#0000ff}this {color});
    buttonPanel.add( {color:#339966}start {color});
    buttonPanel.add( {color:#339966}next {color});
    buttonPanel.add( {color:#339966}previous {color});
    buttonPanel.add( {color:#339966}last {color});
    cp.add( buttonPanel,BorderLayout.{color:#339966}SOUTH {color});
    cp.add( buttonPanel1,BorderLayout.{color:#339966}NORTH {color});{color:#999999}///NewInventory_Test/logo.gif{color}
    java.net.URL u = {color:#0000ff}this{color}.getClass().getClassLoader().getResource({color:#ff9900}"\\NewInventory_Test\\logo.gif"{color});
    ImageIcon icon = {color:#0000ff}new {color}ImageIcon(u);
    {color:#339966}imageLabel{color} = new JLabel( {color:#ff9900}"Inventory View"{color}, icon, JLabel.{color:#339966}CENTER {color});
    cp.add({color:#339966} imageLabel{color},BorderLayout.{color:#339966}WEST{color} );
    {color:#0000ff}this{color}.setContentPane( cp );
    {color:#0000ff}this{color}.setContentPane( cp );
    {color:#0000ff}this{color}.setTitle( "Inventory Program IT 215" );
    {color:#0000ff}this{color}.setDefaultCloseOperation( JFrame.{color:#339966}EXIT_ON_CLOSE{color} );
    {color:#0000ff} this{color}.{color:#339966}textArea{color}.setText({color:#339966}inv{color}.getStart());
    {color:#0000ff} this{color}.setSize(200, 200);
    {color:#0000ff}this{color}.pack();
    {color:#0000ff}this{color}.setVisible( {color:#0000ff}true {color});
    @Override
    {color:#0000ff}public void{color} actionPerformed( ActionEvent e )
    // TODO Auto-generated method stub
    {color:#0000ff} if {color}( e.getActionCommand().equals({color:#ff9900} "Start"{color} ) )
    textArea.setText( {color:#339966}inv{color}.getStart() );
    {color:#0000ff}if {color}( e.getActionCommand().equals( {color:#ff9900}"Next" {color}) )
    textArea.setText({color:#339966}inv{color}.getNext());
    {color:#0000ff}if{color} ( e.getActionCommand().equals( {color:#ff9900}"Previous" {color}) )
    textArea.setText( {color:#339966}inv{color}.getPrevious() );
    {color:#0000ff} if{color} ( e.getActionCommand().equals( {color:#ff9900}"Last"{color} ) )
    textArea.setText({color:#339966}inv{color}.getLast());
    {color:#0000ff}public static {color}LagersAddInfo getInv()
    {color:#0000ff}return{color:#339966} {color}{color}{color:#339966}inv{color};
    {color:#0000ff}public static void{color} setInv( LagersAddInfo inv )
    LagersGUI.{color:#339966}inv {color}= inv;
    {color:#808080} /**
    * @param args
    */{color}
    {color:#0000ff}public static void {color}main( String[] args )
    LagersGUI {color:#ff0000}_inventory_ {color}= {color:#0000ff}new {color}LagersGUI( {color:#ff9900}"Inventory"{color} );{color:#ff0000}//** here's the part I'm having trouble with...inventory is an * unused variable. What other way could I get {color:#000000}main{color} */ method to work?{color}
    }

    This forum can format your code for you and make it easier to read. Simply click the CODE button and two tags will appear. Then paste your code in between the tags. Important, copy code form your source not first post.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need help getting these methods to work

    this program consists three seperate classes. i have two of the three working, i just can't figure out this one. here is my code, and the pseudo code for the methods. any help would be greatly appreciated. i am getting the following 18 errors
    CheckingAccountsTest.java:35: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    if(myFields[indexForAccountType].equals(CheckingAccount.getAccountType())){ //A-1-2-10
    ^
    CheckingAccountsTest.java:45: cannot find symbol
    symbol : constructor CheckingAccountPlus(java.lang.String,java.lang.String,java.lang.String,double)
    location: class CheckingAccountPlus
    CheckingAccountPlus currentAccount = new CheckingAccountPlus(myFields[indexForAccountId], //A-1-2-17 THROUGH A-1-2-20
    ^
    CheckingAccountsTest.java:72: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount.getAccountId().equals(myFields[indexForAccountId]); //A-1-3-06
    ^
    CheckingAccountsTest.java:124: cannot find symbol
    symbol : method makeDeposit(double)
    location: class CheckingAccountPlus
    currentAccount.makeDeposit(amount); //A-1-6-02
    ^
    CheckingAccountsTest.java:161: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:161: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:167: non-static method getAccountType() cannot be referenced from a static context
    currentAccount, currentAccount.getAccountId(), CheckingAccountPlus.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:171: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
    ^
    CheckingAccountsTest.java:171: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
    ^
    CheckingAccountsTest.java:172: getBeginningBalance(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:172: getDeposits(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:172: getWithdrawals(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:173: getFees(double) in CheckingAccount cannot be applied to ()
    currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    ^
    CheckingAccountsTest.java:173: getOverdrafts(double) in CheckingAccount cannot be applied to ()
    currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    ^
    CheckingAccountsTest.java:178: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-12-01
    ^
    CheckingAccountsTest.java:179: cannot find symbol
    symbol : method getBeginningBalance()
    location: class CheckingAccountPlus
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
    ^
    CheckingAccountsTest.java:179: cannot find symbol
    symbol : method getDeposits()
    location: class CheckingAccountPlus
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
    ^
    CheckingAccountsTest.java:180: cannot find symbol
    symbol : method getSumOfCreditCardAdvances()
    location: class CheckingAccountPlus
    currentAccount.getBalance(), currentAccount.getSumOfCreditCardAdvances(), " *"); //A-1-12-03 THROUGH A-1-12-04
    ^
    18 errors
    Process completed.
    public class CheckingAccountsTest
         private static final int indexForAccountId = 0;
         private static final int indexForAccountType = 2;
         private static final int indexForBalance = 5;
         private static final int indexForDepositAmount = 2;
         private static final int indexForFirstName = 3;
         private static final int indexForLastName = 4;
         private static final int indexForRecordType = 1;
         private static final int indexForWithdrawalAmount = 2;
         private static final String recordTypeForDeposit = "CKD";
         private static double sumOfBeginningBalances = 0.0;
         private static double sumOfCreditCardAdvances = 0.0;
         private static double sumOfDeposits = 0.0;
         private static double sumOfEndingBalances = 0.0;
         private static double sumOfFees = 0.0;
         private static double sumOfOverdrafts = 0.0;
         private static double sumOfWithdrawals = 0.0;
    public static void main(String args[])
         MyCsvFile myFile = new MyCsvFile("monthlyBankTransactions,v05.txt"); //A-1-2-01 THRU A-1-2-02
         System.out.println("\nBig Bank: Monthly Checking Account Activity\n"); //A-1-2-04
         System.out.println("----------- Account ----------- Beginning\t\t    With-\t\t   Ending\tOver-\tCredit Cd"); //A-1-2-05
         System.out.println("     Name\t   Id    Type\t Balance   +   Deposit   -  drawal   -    Fee   =  Balance\tdraft\t Advance\n"); //A-1-2-06
         myFile.readARecord(); //A-1-2-07
         while(myFile.getEofFound() == false) //A-1-2-08
              String []myFields = myFile.getCsvRecordFieldArray();//A-1-2-09
              if(myFields[indexForAccountType].equals(CheckingAccount.getAccountType())){ //A-1-2-10
             CheckingAccount currentAccount = new CheckingAccount(myFields[indexForAccountId], //A-1-2-11 THROUGH A-1-2-12
             myFields[indexForFirstName], myFields[indexForLastName],
             Double.parseDouble(myFields[indexForBalance])); //A-1-2-13
             handleAccount(currentAccount, myFile, myFields); //A-1-2-14
             currentAccount = null;// A-1-2-15
        else//A-1-2-16
             CheckingAccountPlus currentAccount = new CheckingAccountPlus(myFields[indexForAccountId], //A-1-2-17 THROUGH A-1-2-20
             myFields[indexForFirstName], myFields[indexForLastName], Double.parseDouble(myFields[indexForBalance]));
             handleAccount(currentAccount, myFile, myFields);
             currentAccount = null; //A-1-2-21
        }//end if A-1-2-22
    }//end while A-1-2-23
         System.out.printf("Report Totals", sumOfBeginningBalances,sumOfDeposits, //A-1-2-24
         sumOfWithdrawals, sumOfFees, sumOfEndingBalances, sumOfOverdrafts, sumOfCreditCardAdvances, "**"); //A-1-2-25
         System.out.printf("The information in the above report is from the 17 records in the following file:",
         myFile.getCountOfRecords());                                                                           //A-1-2-26
         System.out.printf("Path to file:", myFile.getFilePath()); //A-1-2-27
         System.out.printf("Name of file:", myFile.getFileName()); //A-1-2-28
         System.out.println("\nEnd of program"); //A-1-2-29
    }// end main method
    public static void handleAccount(CheckingAccount currentAccount, MyCsvFile myFile, String []myFields)
         sumOfBeginningBalances += currentAccount.getBalance(); //A-1-3-01
         printBeginningBalance(currentAccount); // A-1-3-02
         myFile.readARecord(); //A-1-3-03
         myFields = myFile.getCsvRecordFieldArray(); //A-1-3-04
    while (myFile.getEofFound() == false) //A-1-3-05
       currentAccount.getAccountId().equals(myFields[indexForAccountId]); //A-1-3-06
    if(myFields[indexForRecordType].equals(recordTypeForDeposit)){ //A-1-3-07
         handleDeposit(currentAccount, Double.parseDouble(myFields[indexForDepositAmount])); //A-1-3-08 THROUGH A-1-3-09
          else //A-1-3-10
          handleWithdrawal(currentAccount,Double.parseDouble(myFields[indexForWithdrawalAmount])); //A-1-3-11 THROUGH A-1-3-12
       }//end if //A-1-3-13
    myFile.readARecord();//A-1-3-14
    myFields = myFile.getCsvRecordFieldArray(); //A-1-3-15 THROUGH A-1-3-16
    }//end while //A-1-3-17
    sumOfEndingBalances += currentAccount.getBalance();//A-1-3-18
    printEndingBalance(currentAccount); //A-1-3-19
    public static void handleAccount(CheckingAccountPlus currentAccount, MyCsvFile myFile, String [] myFields)
    sumOfBeginningBalances += currentAccount.getBalance(); //A-1-4-01
    printBeginningBalance(currentAccount); //A-1-4-02
    myFile.readARecord(); //A-1-4-03
    myFields = myFile.getCsvRecordFieldArray(); //A-1-4-04
      while (myFile.getEofFound()==false) //A-1-4-05
    currentAccount.getAccountId().equals (myFields[indexForAccountId]); //A-1-4-06
    if(myFields[indexForRecordType].equals(recordTypeForDeposit)){ //A-1-4-07
         handleDeposit(currentAccount, Double.parseDouble(myFields[indexForDepositAmount])); //A-1-4-08 THROUGH //A-1-4-09
          else //A-1-4-10
          handleWithdrawal(currentAccount,Double.parseDouble(myFields[indexForWithdrawalAmount])); //A-1-4-11 THROUGH A-1-4-12
       }//end if A-1-4-13
    myFile.readARecord(); //A-1-4-14
    myFields = myFile.getCsvRecordFieldArray(); //A-1-4-15 THROUGH A-1-4-16
    }//end while A-1-4-17
    sumOfEndingBalances += currentAccount.getBalance(); //A-1-4-18
    printEndingBalance(currentAccount); //A-1-4-19
    private static void handleDeposit(CheckingAccount currentAccount, double amount)
    sumOfDeposits += amount; //A-1-5-01
    currentAccount.makeDeposit(amount); //A-1-5-02
    System.out.printf("$,%.2f", amount); //A-1-5-03
      private static void handleDeposit(CheckingAccountPlus currentAccount, double amount)
      sumOfDeposits += amount;//A-1-6-01
      currentAccount.makeDeposit(amount); //A-1-6-02
      System.out.printf("$,%.2f", amount); //A-1-6-03
      private static void handleWithdrawal(CheckingAccount currentAccount, double amount)
      if (currentAccount.makeWithdrawal(amount) == true){ //A-1-7-01
       sumOfWithdrawals += amount; //A-1-7-02
       System.out.printf("$,%.2f", amount); //A-1-7-03
      }else{ //A-1-7-04
       double overdraftFee = currentAccount.getOverdraftFee(); //A-1-7-05
       sumOfFees += overdraftFee; //A-1-7-06
       sumOfOverdrafts += amount; //A-1-7-07
       System.out.printf("$,%.2f",overdraftFee, amount); //A-1-7-08
      }//end if A-1-7-09
      private static void handleWithdrawal(CheckingAccountPlus currentAccount, double amount)
           if (currentAccount.makeWithdrawal(amount) == true){ //A-1-8-01
            sumOfWithdrawals += amount; //A-1-8-02
            System.out.printf("$,%.2f",amount); //A-1-8-03
      }else{ //A-1-8-04
       double creditCardAdvance = currentAccount.getCreditCardAdvance(); //A-1-8-05 THROUGH A-1-8-06
       sumOfCreditCardAdvances += creditCardAdvance; //A-1-8-07
       sumOfWithdrawals += currentAccount.getActualWithdrawal(); //A-1-8-08
       System.out.printf("$,%.2f",currentAccount.getActualWithdrawal(),creditCardAdvance); //A-1-8-09
      }//end if //A-1-8-10
    private static void printBeginningBalance(CheckingAccount currentAccount)
    System.out.printf("",   //A-1-9-01 THROUGH A-1-9-02
       currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    private static void printBeginningBalance(CheckingAccountPlus currentAccount)
    System.out.printf("",   //A-1-10-01 TROUGH A-1-10-02
       currentAccount, currentAccount.getAccountId(), CheckingAccountPlus.getAccountType(), currentAccount.getBalance());
    private static void printEndingBalance(CheckingAccount currentAccount)
      System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
        currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
        currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    private static void printEndingBalance(CheckingAccountPlus currentAccount)
      System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-12-01
        currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
        currentAccount.getBalance(), currentAccount.getSumOfCreditCardAdvances(), " *"); //A-1-12-03 THROUGH A-1-12-04
    }PSEUDO CODE FOR ALL METHODS
    This public static method has no return value and has one parameter of type String named args[ ], an array
    A-1-2-01)     INSTANTIATE a local variable named myFile of class MyCsvFile, passing a single String argument for the CSV filename:
    A-1-2-02)          ?monthlyBankTransactions,v05.txt?
    A-1-2-03)     DISPLAY the task / programmer identification line
    A-1-2-04)     DISPLAY the ?Big Bank: Monthly Checking Account Activity? title line
    A-1-2-05)     DISPLAY the first column heading line: ?---------- Account ----------??
    A-1-2-06)     DISPLAY the second column heading line: ? Name Id??
    A-1-2-07)     Get 1st record from CSV file using method readARecord: MyCsvFile class: myFile.readARecord()
    A-1-2-08)     WHILE (myFile.getEofFound() IS FALSE)
    A-1-2-09)          DEFINE a String Array named myFields, and ASSIGN it the value myFile.getCsvRecordFieldArray()
    A-1-2-10)          IF (myFields[indexForAccountType].equals(CheckingAccount.getAccountType()))
    A-1-2-11)               INSTANTIATE a local variable named currentAccount of class CheckingAccount, passing the following arguments:
    A-1-2-12)                    myFields[indexForAccountId], myFields[indexForFirstName], myFields[indexForLastName],
    A-1-2-13)                    Double.parseDouble(myFields[indexForBalance])
    A-1-2-14)               CALL method handleAccount of this class, passing the following arguments: currentAccount, myFile, myFields
    A-1-2-15)               ASSIGN null TO currentAccount
    A-1-2-16)          ELSE
    A-1-2-17)     INSTANTIATE a local variable named currentAccount of class CheckingAccountPlus, passing the following arguments:
    A-1-2-18)          myFields[indexForAccountId], myFields[indexForFirstName], myFields[indexForLastName],
    A-1-2-19)          Double.parseDouble(myFields[indexForBalance])
    A-1-2-20)     CALL method handleAccount of this class, passing the following arguments: currentAccount, myFile, myFields
    A-1-2-21)               ASSIGN null TO currentAccount
    A-1-2-22)          END IF
    A-1-2-23)     END WHILE
    A-1-2-24)     DISPLAY the report-total line using the following arguments: ?Report Totals?, sumOfBeginningBalances, sumOfDeposits,
    A-1-2-25)          sumOfWithdrawals, sumOfFees, sumOfEndingBalances, sumOfOverdrafts, sumOfCreditCardAdvances and ?**?
    A-1-2-26)     DISPLAY the ?The information in the above report? line with the following arguments: myFile.getCountOfRecords()
    A-1-2-27)     DISPLAY the ?Path to file? line with the following arguments: myFile.getFilePath()
    A-1-2-28)     DISPLAY the ?Name of file? line with the following arguments: myFile.getFileName()
    A-1-2-29)     DISPLAY the ?End of program? line
    This private static method has no return value, and has three parameters: currentAccount of type CheckingAccount, myFile of type MyCsvFile and myFields of type String array.
    A-1-3-01)     CALL method currentAcccount.getBalance and ADD its return value to sumOfBeginningBalances
    A-1-3-02)     CALL method printBeginningBalance with the following argument list: currentAccount
    A-1-3-03)     CALL method myFile.readARecord, which reads the 1st record after the Balance record (a deposit or withdrawal) for the current customer
    A-1-3-04)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the values from the
    A-1-3-05)          fields in the record just read available for access as elements in the myFields string array
    A-1-3-06)     WHILE (myFile.getEofFound() IS FALSE AND currentAccount.getAccountId().equals(myFields[indexForAccountId]))
    A-1-3-07)          IF (myFields[indexForRecordType].equals(recordTypeForDeposit))
    A-1-3-08)               CALL method handleDeposit with the following argument list: currentAccount,
    A-1-3-09)                    Double.parseDouble(myFields[indexForDepositAmount]
    A-1-3-10)          ELSE
    A-1-3-11)               CALL method handleWithdrawal with the following argument list: currentAccount,
    A-1-3-12)                    Double.parseDouble(myFields[indexForWithdrawalAmount]
    A-1-3-13)          END IF
    A-1-3-14)          CALL method myFile.readARecord, which reads the next deposit or withdrawal record, if any, for this customer
    A-1-3-15)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the value from the
    A-1-3-16)          fields in the record just read available for access as elements in the myFields string array
    A-1-3-17)     END WHILE
    A-1-3-18)     CALL method currentAcccount.getBalance and ADD its return value to sumOfEndingBalances
    A-1-3-19)     CALL method printEndingBalance with the following argument list: currentAccount
    This private static method has no return value, and has three parameters: currentAccount of type CheckingAccountPlus, myFile of type MyCsvFile and myFields of type String array.
    A-1-4-01)     CALL method currentAcccount.getBalance and ADD its return value to sumOfBeginningBalances
    A-1-4-02)     CALL method printBeginningBalance with the following argument list: currentAccount
    A-1-4-03)     CALL method myFile.readARecord, which reads the 1st record after the Balance record (a deposit or withdrawal) for the current customer
    A-1-4-04)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the values from the
    A-1-4-05)          fields in the record just read available for access as elements in the myFields string array
    A-1-4-06)     WHILE (myFile.getEofFound() IS FALSE AND currentAccount.getAccountId().equals(myFields[indexForAccountId]))
    A-1-4-07)          IF (myFields[indexForRecordType].equals(recordTypeForDeposit))
    A-1-4-08)               CALL method handleDeposit with the following argument list: currentAccount,
    A-1-4-09)                    Double.parseDouble(myFields[indexForDepositAmount]
    A-1-4-10)          ELSE
    A-1-4-11)               CALL method handleWithdrawal with the following argument list: currentAccount,
    A-1-4-12)                    Double.parseDouble(myFields[indexForWithdrawalAmount]
    A-1-4-13)          END IF
    A-1-4-14)          CALL method myFile.readARecord, which reads the next deposit or withdrawal record, if any, for this customer
    A-1-4-15)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the value from the
    A-1-4-16)          fields in the record just read available for access as elements in the myFields string array
    A-1-4-17)     END WHILE
    A-1-4-18)     CALL method currentAcccount.getBalance and ADD its return value to sumOfEndingBalances
    A-1-4-19)     CALL method printEndingBalance with the following argument list: currentAccount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccount and amount of type double.
    A-1-5-01)     ADD amount TO sumOfDeposits
    A-1-5-02)     CALL method currentAccount.makeDeposit, passing it the following arguments: amount
    A-1-5-03)     DISPLAY the deposit line using the following arguments: amount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccountPlus and amount of type double.
    A-1-6-01)     ADD amount TO sumOfDeposits
    A-1-6-02)     CALL method currentAccount.makeDeposit, passing it the following arguments: amount
    A-1-6-03)     DISPLAY the deposit line using the following arguments: amount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccount and amount of type double.
    A-1-7-01)     IF (currentAccount.makeWithdrawal(amount) IS TRUE)
    A-1-7-02)          ADD amount TO sumOfWithdrawals
    A-1-7-03)          DISPLAY the withdrawal line using the following arguments: amount
    A-1-7-04)     ELSE
    A-1-7-05)          DEFINE variable overdraftFee of type double and ASSIGN it the value returned from a call of method currentAccount.getOvedraftFee
    A-1-7-06)          ADD overdraftFee TO sumOfFees
    A-1-7-07)          ADD amount TO sumOfOverdrafts
    A-1-7-08)          DISPLAY the overdraft line using the following arguments: overdraftFee, amount
    A-1-7-09)     END IF
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccountPlus and amount of type double.
    A-1-8-01)     IF (currentAccount.makeWithdrawal(amount) IS TRUE)
    A-1-8-02)          ADD amount TO sumOfWithdrawals
    A-1-8-03)          DISPLAY the withdrawal line using the following arguments: amount
    A-1-8-04)     ELSE
    A-1-8-05)          DEFINE variable creditCardAdvance of type double and ASSIGN it the value returned from a call of method
    A-1-8-06)               currentAccount.getCreditCardAdvance
    A-1-8-07)          ADD creditCardAdvance TO sumOfCreditCardAdvances
    A-1-8-08)          ADD currentAccount.getActualWithdrawal() TO sumOfWithdrawals
    A-1-8-09)          DISPLAY the credit-card-advance line using the following arguments: currentAccount.getActualWithdrawal(),creditCardAdvance
    A-1-8-10)     END IF
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccount.
    A-1-9-01)     DISPLAY the beginning balance line using the following arguments: currentAccount , currentAccount.getAccountId(),
    A-1-9-02)          currentAccount.getAccountType() and currentAccount.getBalance()
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccountPlus.
    A-1-10-01)     DISPLAY the beginning balance line using the following arguments: currentAccount , currentAccount.getAccountId(),
    A-1-10-02)          currentAccount.getAccountType() and currentAccount.getBalance()
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccount.
    A-1-11-01)     DISPLAY the ending balance line using the following arguments: ?Account Totals,? currentAccount.getAccountId(),
    A-1-11-02)          currentAccount.getAccountType(), currentAccount.getBeginningBalance(), currentAccount.getDeposits(),
    A-1-11-03)          currentAccount.getWithdrawals(), currentAccount.getFees(), currentAccount.getBalance() and
    A-1-11-04)          currentAccount.getOverdrafts(), ?? *?

    You're calling a bunch of methods and constructors with the wrong arguments, or missing arguments. Take the errors one by one, and look at the method you're being told you're calling, and check that the arguments you're using are right

  • Get All Control Values [Variant] Method for Global Vars

    Hello,
    to get all the data of controls use in a VI, the methode "Get All Control Values [Variant]" can be used fine.
    Is anything else available for gloabl variables which are use by this VI?
    Thanks.

    Yes, I tried to link this methode to the vi which contains the global vars but got the error message
    "you cannot make a strict vi refernce to a global VIs.
    Any other idea?
    Thanks, Thomas.
    Message Edited by maximint on 05-30-2007 08:41 AM
    Attachments:
    Untitled.vi ‏40 KB

  • What is the need for setting property data inside the JMSMesage

    Hi
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball");
    and also please tell me how can the MDB recievies this property data ??
    Thanks in advance .

    raviprivate wrote:
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball"); Look at the detail JMS documentation on [Message Properties|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html] .
    >
    and also please tell me how can the MDB recievies this property data ?? MDB onMessage method argument is the Message object and if you look at the documentation, Message interface has getter methods to retrieve the properties.

  • Get the method name

    hi
    can anyone know how to get the name of method from its catch block.
    For example
    i have a class called Hello.java
    and inside that a method called display();
    and i have a written the code inside a try catch block.so when an exception occurs i want to create a log file
    i got the class name using this.getClass().getSimpleName()
    so is there any way to get the method name , where the catch is written. (here in example i should get it as "display")
    plz help me
    im in great need.
    hope u understood my doubt.
    rgds

    Use a logging framework, and name the loggers well & use meaningful messages?
    Or create a Throwable, [fill in|http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html#fillInStackTrace()] the stack trace, get the required StackTraceElement and [get the method|http://java.sun.com/javase/6/docs/api/java/lang/StackTraceElement.html#getMethodName()] from this.

  • Getter & Setter Method not getting called for a field enhanced through AET

    Hello,
    I am new to SAP CRM 7.0 and working on a requirement.
    A Z-field was added by our functional guy in CRM 7.0 WebGui through AET in the 'Create Opportunity' transaction (Header data).
    Now the requirement is, as soon as the opportunity is created through the WebGui, I should post a document in R/3 and paste that document number back to the enhanced Z-field in opportunity.
    Work done by me:
    I pressed F2 on the enhanced Z-field in the WebGui screen and took the details of view, component name etc. After this I went to normal SAP CRM system and open tcode "BSP_WD_CMPWB", located the corresponding view "BT111H_OPPT/Details" and right clicked & enhanced the same.
    Then I opened the structure of this view, expanded context node, located context "BTOPPORTH" and inside this, located my Z-attribute. Now right clicked on the Z-attribute & selected the option "Generate SETTER & GETTER Methods" and these were generated successfully.
    Problem:
    The problem is even after putting external break points in these methods, these methods are not getting called while creating, modifying & displaying the Opportunity in WebGui.
    I hope that for the requirements that I have, I have to do the coding in "Getter & Setter" methods. But since these are not getting called, I am unable to proceed.
    Please help/suggest how to achieve this.
    Thanks in anticipation.
    Best Regards,
    Rahul Malani

    Hi,
    If you can see the field in UI and still get_ method is not being triggered then try to regenerate these methods. If it still doesn't work then please look for SAP notes or raise an OSS.
    There should be some note for the issue you faced.
    please refer:
    Help Needed immediately - AET getter setter methods not getting triggered
    Regards,
    BJ

  • How to get protected method ?

    I thought i can get protected method of my class when calling a Class.getMethod(String, Class []) in another class which inside the same package. However, it seem that i can't do that because it throw me a NoSuchMethodException when the method was protected. I thought all classes in same package can access the protected methods or fields of each other ??? Why ?
    So, how i'm able to get the protected method in runtime ? (Hopefully no need to do anything with the SecurityManager)

    It is working
    Pls try the following program ...
    public class p1 {
    public static void main(String as[]) {
    p2 ps2 = new p2();
    ps2.abc();
    class p2 {
    protected void abc() {
    System.out.println("Hello");
    regards,
    namanc

  • Native methods inside C++ class

    Hey all,
    Tried posting this already but it didn't appear in the forums. So apologies if this appears twice on same forum :o)
    Want to wrap my native methods inside a C++ class but get UnsatisfiedLinkerError when I do. Is it possible to do this? Do I have to change some method signatures or what?
    I want something like :
    public class A
    native void doSomething();
    class B
    public:
    JNIEXPORT void JNI Java_A_doSomething() { ... } /* or whatever */
    It works ok outside of a C++ class but I'd prefer to contain my methods inside a class. Any help?
    Cheers,
    Conor

    Java needs to find your functions in the DLL or SO. But the names are "mangled" if you declare the function inside a class - even declaring the function "static" does not help. For instance, using the Microsoft C++ compiler:
    class B
    public:
    static JNIEXPORT void JNI Java_A_doSomething() { ... }
    };the name is mangled to ?Java_A_doSomething@B@@SAXXZ
    But Java tries to locate the entry _Java_A_doSomething@0 in the DLL.
    You can write the global functions as:
    JNIEXPORT void JNI Java_A_doSomething() {
        B::doSomething();
    }and implement your functions in the class B. The advantage of this approach is that you can write all bookkeeping work of converting Java data to C++ data in the global function, and leave the real work to the function declared in the C++ class.

  • Why does serializable interface has no methods inside it

    Aloha
    Can anyone please help me with this....Serializable interface has no methods inside it.So how is it useful to the user.Also if I am writing a class which implements Serializable how does JVM know what to do.?

    JoachimSauer wrote:
    dannyyates wrote:
    [The JVM] doesn't know about serialisation [...]Sorry for the nitpick, but that's not completely true. The JVM needs to know about serialisation at least at little bitNo.
    since Serialization creates new objects without the code from the constructrs ever being run. ObjectInputStream loads the classes just like any other code would, although it's obviously reading the serialized stream to get that information... and then calls newInstance() on ObjectStreamClass.
    And ObjectStreamClass uses reflection to get a constructor (via java.lang.Class getDeclaredConstructor ) and then uses said java.lang.reflect.Constructor to create a new instance via newInstance()
    There is no JVM magic. It is all Java code. (With the exception of what java.lang.reflect.Constructor does because at the point it dives into sun packages but you could do the same by calling java.lang.reflect.Constructor)

  • Hard drive failed - need to get music off my iPod

    Greetings:
    I have an iPod Video, 80 gigabyte.
    A while back, I had a hard drive fail which was storing all my music to sync to the iPod. Now, I have the music on the iPod, but need to get it back into iTunes, without iTunes deleting the music upon sync.
    Is there a way to do this?
    Thanks,
    Paul

    Connect your iPod to your computer. If it is set to update automatically you'll get a message that it is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all the songs from your iPod. Your iPod should appear in the iTunes source list from where you can change the update setting to manual and use your iPod without the risk of accidentally erasing it. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default. Check the "manually manage music and videos" box in Summary then press the Apply button: Managing content manually on iPod
    Once you are safely connected there are a few things you can do to restore your iTunes from the iPod. If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article: Copying iTunes Store purchases from your iPod to a computer
    The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can read reviews and comparisons of some of them here:
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    TuneJack Windows Only
    iPod2PC Windows Only
    iGadget Windows Only
    iDump Windows Only
    SharePod Windows Only
    iPodRip Mac & Windows
    YamiPod Mac and Windows
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link: Two-way Street: Moving Music Off the iPod
    Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync. I would also advise that you get yourself an external hard drive and back your stuff up, relying on an iPod as your sole backup is not a good idea and external drives are comparatively inexpensive these days, you can get loads of storage for a reasonable outlay.

  • To call methods inside the same application is possible to use RMI ?

    hello,
    What I should like to know is if RMI can easily be used to implement comunication (calling methods) inside classes that are part of the one same application... This should be a restrict case to use RMI...
    The reason to do it come from the need to use the instance of a class knonwing it only as Object... This can be good to do if some code is used for general pupose in many different contexts.
    In this case you can pass to the "server class" a parameter 'o' of type Object (all the classes extend Object) of the "customer class" to get back informations if some elaboration happen inside the "server class"...
    This purpose is generally implemented with event listeners, but perhaps it could be done easily using RMI too (I dont know it...).
    Using RMI in this simple situation, don't should require anything of complicate (stub, .... mashalling parametres....) to have the reference to method of the "customer class" to call. The "server class" already recives a reference of the "customer class" how parameter of type Object, and the mame of the method too.
    I propose a simple thoeric example to explain really what I said before:
    Class Server {
        String methodName;
        Object obj;
        pubic Server( Oject o , String metName){  // constructor
            obj = o;
            methodName = metName;
            // some thing is done and, at last, the method callbakMethod() is executed
            callbakMethod();
        }// constructor
        public void callbakMethod(){ // this method have the purpose to call customerMethod()
              Class c = owner.getClass();                            
              Method m = null;
                  try {
                          m = c.getMethod("callBackMethod",null);     
                         * // (1)
                          // I think that here we could have the possibility to call
                          // the method  customerMethod() belonging to class Customer..
                          // I don't know if it possible and  ...  (and if it is possible) I am not able to do it*
        }// callbakMethod()
    }  // class Server
    Class Custmer{
        public Customer() { // constructor
              Server s = new Server (this, "customerMethod");
        } // constructor
        customerMethod() {    // I would this method is called from class Server
            // do some thing.....
        }  //customerMethod
    }  // class CustomerMy ask is: it is possible to call customerMethod() from the Server class ?...
    If the aswer is yes, I wold know the sintax to use to do it, please.
    thank you
    regards
    tonyMrsangelo

    RMI doesn't help you in the slightest here. You can just realize it all using local method invocation. All RMI does is to make that remote. If the objects aren't remote there is no point.

  • Help needed in getting the previous Quarter Data

    Hello folks,
    I have this procedure where i have to modify the current procedure in the following manner:
    I need to get rid of the variables p_start and p_end so that i cannot see them in the crystal report and include the Frequency in the procedure to get the Data based on the Dates.
    and Main requirement is" If the Frequency is Quarterly " it should get the previous quarter Data, if "Frequency is monthly" it should return the previous month data.Can anyone please let me know where shud i make changes. Am including the procedure for refernce. Any help is appreciated
    Thanks a millioin,
    CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h(report_record in out cr_return_types.gen_cursor,
    p_start       string,
    p_end         string)
    IS
    v_startdate date;
    v_enddate date;
    BEGIN
    v_startdate := to_date(p_start, 'YYYY/MM');
    v_enddate := last_day(to_date(p_end, 'YYYY/MM'));
    open report_record for
    select --distinct r.recovery_id
    r.event_id,
    r.event_case_id,
    c.client_id,
    c.client_code,
    c.client_name,
    b.branch_group_code,
    b.branch_group_description,
    g.employer_group_code,
    g.employer_group_name,
    e.client_policy_identifier,
    e.date_of_incident,
    e.event_type_code,
    sum(nvl(r.amount, 0)) as amt_received,
    nvl(sum(case
    when r.amount >= 0 then
    rd.fees
    else
    rd.fees * (-1)
    end),
    0) as fees,
    ec.close_date, *001* commented
    (case
    when ec.close_date <= to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
    'MMDDRRRR HH24MISS') then
    ec.close_date
    else
    null
    end) as close_date, --*001*  added
    get_case_value(ec.event_id, ec.event_case_id, v_enddate) as case_value,
    nvl(etl.fee_percent_flag, 'N') workmans_comp,
    max(to_char(r.recovery_date, 'FMMonthYYYY')) Year_Month,
    max(to_char(r.recovery_date, 'YYYYMM')) Y_M,
    max(to_date(to_char(r.recovery_date, 'MMYYYY'), 'MM/YYYY')) date_MY
    from recovery r,
    recovery_detail rd,
    event e,
    client c,
    branch_group b,
    employer_group g,
    event_case ec,
    event_type_lookup etl
    where r.event_id = e.event_id
    and r.event_case_id = ec.event_case_id
    and ec.event_id = e.event_id
    and rd.recovery_id(+) = r.recovery_id
    and r.recovery_date between v_startdate and
    to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
    'MMDDRRRR HH24MISS')
    and e.client_id = c.client_id
    and g.client_id = c.client_id
    and b.client_id = c.client_id
    and g.employer_group_id(+) = e.employer_group_id
    and b.branch_group_id(+) = g.branch_group_id
    and e.event_type_code = etl.event_type_code -- SST 130852 04/14/09
    group by r.event_id,
    r.event_case_id,
    c.client_id,
    c.client_code,
    c.client_name,
    b.branch_group_code,
    b.branch_group_description,
    g.employer_group_code,
    g.employer_group_name,
    e.client_policy_identifier,
    e.date_of_incident,
    e.event_type_code,
    ec.close_date,
    get_case_value(ec.event_id, ec.event_case_id, v_enddate),
    nvl(etl.fee_percent_flag, 'N')
    having sum(nvl(r.amount, 0)) <> 0
    order by c.client_code,
    b.branch_group_code,
    g.employer_group_code,
    r.event_case_id;
    Edited by: user11961230 on Oct 20, 2009 9:02 AM

    user11961230 wrote:
    1. I want to get rid of the p_start and p_end. So how do i declare the v_startdate and v_enddate in the following part?
    v_startdate := to_date(p_start, 'YYYY/MM');
    v_enddate := last_day(to_date(p_end, 'YYYY/MM'));I'm not sure what you mean by "declare".
    In PL/SQL, "declare" means state (at the beginning of a block) that there will be a certain variable with a certain name (such as v_startdate) and datatype (such as DATE). You're already declaring the variables v_startdate and v_enddate correctly, right before the BEGIN statement.
    Declaring a variable is not the same as initializing it, that is, giving it a value for the first time. Your next question seems to be about initializing..
    2. where exactly shud i include the logic that u have mentioned. sorry a dumb questionIn place of the two assignment statments that reference p_start and p_end.
    3. This time am gonna use frequency instead of report_type so that i will get rid of the p_start and p_end from the procedure.Do you mean you want to pass an argument (called frequency) that tells if you want a quarterly or a mionthly report, just like the variable report_type in my example?
    If so, replace report_type in my example with frequency.
    I think you want something like this:
    CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h
    (      report_record         in out     cr_return_types.gen_cursor
    ,      frequency         IN           VARCHAR2
    IS
         -- Declare local variables:
         v_startdate     date;
         v_enddate      date;
    BEGIN
         -- Initialize v_startdate and v_enddate, depending on frequency
         IF  frequency = 'QUARTERLY'
         THEN
              v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -3)
                                           , 'Q'
              v_enddate := TRUNC (SYSDATE, 'Q');
         ELSIF  frequency = 'MONTHLY'
         THEN
              v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -1)
                             , 'MM'
              v_enddate := TRUNC (SYSDATE, 'MM');
         END IF;
         --   Subtract one second from v_enddate
              v_enddate := v_enddate - ( 1
                                            / (24 * 60 * 60)
         open report_record for
         select --distinct r.recovery_id
                r.event_id,
         and     r.recovery_date  BETWEEN  v_startdate     
                         AND       v_enddate
         ...When you post formatted text on this site (and code should always be formatted), type these 6 characters:
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
    Edited by: Frank Kulash on Oct 20, 2009 2:37 PM
    Changed query to use BETWEEN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I got a new laptop (Macbook Pro) and my IPhone is synced with my previous laptop. I've recorded dozens of very long (un-emailable) Voice Memos over the last few weeks and need to get them from my IPhone onto my new laptop. How do I do this?

    I got a new laptop (Macbook Pro) and my IPhone is synced with my previous laptop (which I no longer have). I've recorded dozens of very long (un-emailable) Voice Memos over the last few weeks and need to get them from my IPhone onto my new laptop.
    How do I do this?
    (when I click on the Sync option I get the warning: "Are you sure you want to sync music? All existing songs and playlists on the iPhone will be replaced with songs and playlists from your iTunes library." I fear that if I click this I will lose all of my important Voice Memos as well)

    Just to add to what ChrisJ4203 said.  You can sync them to your new computer using iTunes by selecting to Include Voice Memos on the Music tab of your iTunes sync settings and syncing.  However, you still need to re-establish syncing with the new computer without iTunes erasing all the iTunes media from your phone (as the warning mentioned).
    If you copy your entire iTunes folder (not just your music) from your old computer to your new one, along with other non-iTunes media you may be syncing with iTunes (such as contacts, calendars and any photos synced to your phone from your old computer) by using migration assistant of following one of these methods: http://support.apple.com/kb/HT4527, then when you sync again with your new computer it will recognize your phone and sync as it did before.  You will still have to authorize the new computer for any Apple IDs used to purchase from the iTunes and App stores (in iTunes>Store>Authorize this computer). 
    After that you can sync your voice memos to your computer as mentioned earlier.
    If you want to archive your voice memos before you do anything with iTunes, you can use a 3rd party program such as PhoneView or Touch Copy.

Maybe you are looking for

  • Command button not working

    Hi, I have a <h:panelGrid><td><h:commandButton id="aButton" value="Add" action="#{hubreceivingbean.createRecord}" /></td></h:panelGrid> this is not working, I'm not sure what wrong I'm doing, my code is ============ hubReceiving.jsp==================

  • Headphone remote not working after iOS 8.1.2 update on iPhone 5

    Following iOS 8.1.2 update my iPhone 5 no longer responds to the inline remote on my headphones.  Remote still works fine with my laptop so the problem is specific to the updated iPhone.  I am using SkullCandy Earbuds.  Any ideas?  Thanks!

  • Can I use iMac display as an external monitor with a pc?

    I have a Windows laptop with VGA output. Can I connect this laptop's VGA output to mini display port of my 27" iMac?

  • Bluetooth connection notification sound

    Does anyone know how to turn off the notification sound which plays when the Razr Maxx bluetooth connects with a car system? It is extremely annoying to have this play every time you get in the car and start it especially if you are running errands a

  • "Oracle Database 10g: SQL Fundamentals I"  with a FRENCH language ?

    S'il vous plait ,je veux telecharger des cours en "Oracle Database 10g: SQL Fundamentals I" en francais est ce qu'il ya des liens disponible...? Merci -Please i want to download a Course "Oracle Database 10g: SQL Fundamentals I" with a FRENCH languag