Importing Date Class

Hi,
          I am importing java.util.* and java.sql.timestamp (not java.sql.*)
          and defining a variable of type Date say :-
          Date date;
          It complains saying: Ambiguous class definition: java.util.Date vs
          java.sql.Date ;
          the interesting thing is it works well on JDK1.2.2 on WinNT while it
          gives the above problem on Solaris.
          Any ideas would be appreciated,
          Thanks!
          Vikas
          

That I already did and that would have surely worked but that's not the
          solution i was looking for,
          coz there's a way you import the java classes and if it works on NT, why
          shudn't it work on Solaris?
          What do u say?
          Rich Cariens wrote:
          > change
          >
          > Date date;
          >
          > to:
          >
          > java.util.Date date;
          >
          > and see if that works...
          >
          > Vikas Goel wrote:
          >
          > > Hi,
          > > I am importing java.util.* and java.sql.timestamp (not java.sql.*)
          > > and defining a variable of type Date say :-
          > > Date date;
          > >
          > > It complains saying: Ambiguous class definition: java.util.Date vs
          > > java.sql.Date ;
          > > the interesting thing is it works well on JDK1.2.2 on WinNT while it
          > > gives the above problem on Solaris.
          > >
          > > Any ideas would be appreciated,
          > > Thanks!
          > > Vikas
          >
          > --
          > Rich
          

Similar Messages

  • How to create new data class in DDIC?

    Hi Friends,
    I want to store 5 custom tables into a particular Table space.
    For that i want to creat a new Dataclass and which has to be mapped to a new table space.
    So what i need is.
    1. How to create a new Customer data class apart from USER1 and USER that is available?
    2. How to map the newly created Dataclass to a Table space?
    Purpose: DBA wants to maintain these tables separately so that this won't disturb other data.
    SAP VERSION - 4.7EE - AIX - DB2
    Any help on this would be highly appreciated.
    Regards,
    Simha

    you can use either usr or usr1 for your  development ... because
    read the belo statment  provided by SAP
    The data class defines the physical area of the database (for ORACLE the TABLESPACE) in which your table is logically stored. If you choose a data class correctly, your table will automatically be assigned to the correct area when it is created on the database.
    The most important data classes are (other than the system data):
    APPL0    Master data
    APPL1    Transaction data
    APPL2    Organizational and customizing data
    Master data is data which is frequently read, but rarely updated. Transaction data is data which is frequently updated. Organizational und customizing data is data which is defined when the system is initialized and then rarely changed.
    There are two more data classes available, USR and USR1. These are reserved for user developments. The tables assigned to these data classes are stored in a tablespace for user developments.
    Note:The data class only has an effect on table storage for the database systems ORACLE and INFORMIX

  • What is data Class ?

    Hi.
    I need to know what is "data class". I am aplying a hot package in SAP, and it generated a error because el data class USR34 not exists associated with cdhdr table. The note says that I must create it, but I don´t know how I must to do it.
    And  I don't know if I can associate other data class that exists as USR33.
    Thanks for your help.
    Maria C.

    Hello Maria,
    Data class is a technical attribute of a table.
    Data class in technical settings
        The data class defines the physical area of the database (for ORACLE the
        TABLESPACE) in which your table is logically stored. If you choose a
        data class correctly, your table will automatically be assigned to the
        correct area when it is created on the database.
        The most important data classes are (other than the system data):
        o   APPL0    Master data
        o   APPL1    Transaction data
        o   APPL2    Organizational and customizing data
        Master data is data which is frequently read, but rarely updated.
        Transaction data is data which is frequently updated. Organizational und
        customizing data is data which is defined when the system is initialized
        and then rarely changed.
    Regards,
    Vasanth

  • WHAT IS MEANT BY DATA CLASS ? EXPLAIN IN DETAIL.

    HAI,
            WHAT IS MEANT BY DATA CLASS ?  TYPE OF DATA CLASS ?EXPLAIN IN DETAIL.
    THANK YOU
    ASHOK KUMAR

    Hi,
    The data class determines the tablespace that the table is assigned to. (The term "tablespace" applies to Oracle databases. For Informix, substitute the term "DB space.") A tablespace is a physical file on disk that is used to hold tables. Every table is assigned to one tablespace. Tables with similar characteristics are usually grouped into one tablespace, so tablespaces are the administrative units used by the DBA to manage the database. For example, tables that grow quickly will be grouped together in a tablespace on a disk with a lot of free space.
    Each data class has an associated tablespace. When you activate a table, it is created in the tablespace associated with that data class. If you change the data class when the table is active, nothing happens; it doesn't move to another tablespace.
    The important data classes are:
    APPL0 or master data. By choosing APPL0 (master data), you signify that the table is not updated often and grows slowly. It will be placed in a tablespace with similar tables. Vendor master and customer master tables are good examples of master data.
    APPL1 or transaction data. By choosing APPL1 (transaction data), you signify that the table is expected to be updated often and to grow quickly. Orders placed with vendors and orders received from customers are good examples of transaction data. Tables containing these orders will have a data class of APPL1.
    APPL2 or customizing data. By choosing APPL2 (customizing data), you signify that the table's contents are determined before implementation and do not change often after that. Check tables and their associated text tables, such as ztxt005 and ztxt005t, are good examples of tables that should have a data class of APPL2.
    Hope this helps.
    Reward if helpful.
    regards,
    Sipra

  • ITunes was unable to load data class information from Sync Services. Reconnect or try again later.

    Ever since I upgraded to iTunes 10.4 I've been getting this dreaded message on many occasions when I try to sync my iPhone 4 or iPad 2 with my Win 7 64 bit machine. "iTunes was unable to load data class information from Sync Services. Reconnect or try again later." What happens is that local content (music, videos etc) will sync properly to my iPhone, but other content (such as Outlook information, MobileMe stuff, etc) will not.
    I have uninstalled and completely purged all Apple data from my PC (including hidden files and folders under Common Files and in the Registry) and reinstalled iTunes. Yet after one or two syncs, the same problem resurfaces. The other weird part is that the Sync Services crap-out message will happen after I do a successful sync, leave the iPhone connected to the PC, and don't even touch the computer for several hours.
    I've actually developed a very tedious work around that seems to restore syncing if for a short time.
    - Undock/unconnect all Apple devices from the PC.
    - Close iTunes, MobileMe control panel, and Safari (if you have it).
    - Start Task Manager (Ctrl + Alt + Del) and shut down iTunesHelper.exe and SyncServer.exe
    - Open up a Windows Explorer window (like My Computer) and under Tools, Folder Options, View, toggle on Show Hidden Files and toggle off Hide Protected Operating System FIles
    - In WIndows Explorer, navigate to "C:\Users\<your name>\App Data\Roaming\Apple Computer". Rename the folder Sync Services to something else, like Sync Services_Old.
    - In WIndows Explorere, navigate to "C:\Program Files (x86)\Common Files\Apple\Mobile Device Support" and double-click on AppleSyncNotifier.exe.
    - Go back to your Folder Options and turn off SHow Hidden Files and toggle on Hide Protected Operationg System Files
    Now you can start up iTunes again and connect your device. It should sync properly again (at least, until it doesn't once more).
    Does anyone at Apple have any idea about this error or a solution?

    I actually spent a fair amount of time on the phone with a senior Apple tech last week. He directed me to this topic:
    http://support.apple.com/kb/HT1923?viewlocale=en_US
    It's important that you go through the steps EXACTLY as described here and in the proper order. Also make sure MobileMe control panel is uninstalled (if you have it).
    Interestingly, when I went through this procedure and then reinstalled iTunes 10.4 64-bit  (didn't do MobileMe or Safari at this stage, but QT is automatically installed) everything worked perfectly. The aforementioned error messages disappeared and all is working flawlessly, as it should.
    I hope my expereince will help! Give it a try.

  • Import data from excel/csv file in web dynpro

    Hi All,
    I need to populate a WD table by first importing a excel/CSV file thru web dynpro screen and then reading thru the file.Am using FileUpload element from NW04s.
    How can I read/import data from excel / csv file in web dynpro table context?
    Any help is appreciated.
    Thanks a lot
    Aakash

    Hi,
    Here are the basic steps needed to read data from excel spreadsheet using the Java Excel API(jExcel API).
    jExcel API can read a spreadsheet from a file stored on the local file system or from some input stream, ideally the following should be the steps while reading:
    Create a workbook from a file on the local file system, as illustrated in the following code fragment:
              import java.io.File;
              import java.util.Date;
              import jxl.*;
             Workbook workbook = Workbook.getWorkbook(new File("test.xls"));
    On getting access to the worksheet, once can use the following code piece to access  individual sheets. These are zero indexed - the first sheet being 0, the  second sheet being 1, and so on. (You can also use the API to retrieve a sheet by name).
              Sheet sheet = workbook.getSheet(0);
    After getting the sheet, you can retrieve the cell's contents as a string by using the convenience method getContents(). In the example code below, A1 is a text cell, B2 is numerical value and C2 is a date. The contents of these cells may be accessed as follows
    Cell a1 = sheet.getCell(0,0);
    Cell b2 = sheet.getCell(1,1);
    Cell c2 = sheet.getCell(2,1);
    String a1 = a1.getContents();
    String b2 = b2.getContents();
    String c2 = c2.getContents();
    // perform operations on strings
    However in case we need to access the cell's contents as the exact data type ie. as a numerical value or as a date, then the retrieved Cell must be cast to the correct type and the appropriate methods called. The code piece given below illustrates how JExcelApi may be used to retrieve a genuine java double and java.util.Date object from an Excel spreadsheet. For completeness the label is also cast to it's correct type. The code snippet also illustrates how to verify that cell is of the expected type - this can be useful when performing validations on the spreadsheet for presence of correct datatypes in the spreadsheet.
      String a1 = null;
      Double b2 = 0;
      Date c2 = null;
                        Cell a1 = sheet.getCell(0,0);
                        Cell b2 = sheet.getCell(1,1);
                        Cell c2 = sheet.getCell(2,1);
                        if (a1.getType() == CellType.LABEL)
                           LabelCell lc = (LabelCell) a1;
                           stringa1 = lc.getString();
                         if (b2.getType() == CellType.NUMBER)
                           NumberCell nc = (NumberCell) b2;
                           numberb2 = nc.getValue();
                          if (c2.getType() == CellType.DATE)
                            DateCell dc = (DateCell) c2;
                            datec2 = dc.getDate();
                           // operate on dates and doubles
    It is recommended to, use the close()  method (as in the code piece below)   when you are done with processing all the cells.This frees up any allocated memory used when reading spreadsheets and is particularly important when reading large spreadsheets.              
              // Finished - close the workbook and free up memory
              workbook.close();
    The API class files are availble in the 'jxl.jar', which is available for download.
    Regards
    Raghu

  • Importing Data from Excel (XML) into Adobe - Multiple Lines

    I have a form that I have created in Adobe Life Cycle Designer 4.
    All the data I need is now stored in an XML file that was created in Excel.
    When I attempt to import the data into Adobe Acrobat using the "Import Data" feature, it only imports the first line of data, but we have over 500 records that we would like to generate into 500 filled forms
    Each line of data represents 1 entire form and all the fields.  The importation works just fine on the first line of data and the fields get populated properly, but I am trying to find a way of importing each line so that each line
    generates a "filled out form".
    In essence, there would be 500 PDF's generated, each one with unique data based on the data in each line of the XML file.
    Any help here would be greatly appreciated
    Thank you in advance!
    Regards,
    Nizar

    There are two options
    1. try to use SQL*Loader utility.
    2. Make JDBC ODBC connection to Excel file and use JDBC queries to read and store data to database. The name of first row columns are used as table columns. The java code example for this is posted below,
              Connection con= null;
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con= DriverManager.getConnection("jdbc:odbc:GC", "", "");
                   Statement stmt= con.createStatement();
                   ResultSet rs= stmt.executeQuery("select username, password from userlogin");
                   while (rs.next())
                        String lname = rs.getString(1);
                        String fname = rs.getString(2);
                        System.out.println(fname + " " + lname);
                   rs.close();
                   System.out.println(con.isClosed());
                   stmt.close();
              finally
                   if (con != null)
                        con.close();
              }

  • Import data from xml using ssis

    Using Sql Server 2012 STD edition, SSDT (Visual Studio 2010 shell, .net framework 4.0.3 SP1
    I am trying to import data from an xml file using ssis.
    Here are the three options I tried and none worked. Please see errors that I encountered in all options and let me know what I can do to import this data in sql
    server.
    I created a new ssis project with an ssis package. I pulled a data flow task on the control flow. On the data flow tab I pulled an xml source and a sql server
    destination. Now I tried to configure the xml source task in the the following three ways, but none worked.
    1. I browse the xml file to set xml location. Browse the xsd file to set xsd location, then click ok. I get the following error:
    HRESULT errorcode 0xC02090CF from a method call. There was an error setting up the mapping. Undefined complex Type 'gml_V4.1_Release:PolygonType'
    is used as a base for complex type extension
    2. I browse the xml file to set xml location. check "Use inline schema" Click ok. Error:
    HRESULT errorcode 0xC020929E from a method call. The xml source adapter was unable to process the XML data. Multiple inline schemas are not supported.
    3.I browse the xml file to set xml location. Click "Generate  XSD". Error: The supplied xml instance is a schema or contains inline schema. The
    class cannot infer a schema for a schema.
    Thank you for your help.

    Hi ,
    I think something problem with the XSD file i too faced somewhat same problem, i have created XSD file from the following link and tried in my package it has worked why don't u try to create xsd file from following link and try again once.
    http://xmlgrid.net/xml2xsd.html
    Niraj Sevalkar

  • RE: Importing a class CEX file using TOOL

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

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

  • Classpath problems when importing my classes

    I'm using a tutorial with sample programs dealing with bank accounts.
    I get this error:
    InterestBearingAccount.java [9:1] '.' expected
    import Account;
    ^
    1 error
    Errors compiling InterestBearingAccount.
    The Account class already exists in the current directory. I've tried everything as far as setting the classpath variable (nothing, just a period, period & slash, the actual complete path for the current directory, nothing works!!!!!). I also tried using -classpath (.) and the end of my javac command and that seemed to not work at all.
    The Java Coffee Break tutorial have some already compiled (*.class) files and they run fine. My *.java files are identical. In fact, I cut and pasted them so I know it's not a typo.
    My path is set to include the jdk1.4.0\bin directory and I've only begun to have problems now that I need to import existing classes into the programs.
    I should mention that I get the same error using Forte environment or doing it at the command prompt window. Please help.

    Thanks ATMGUY. I commented out the import statements in both InterestBearingAccount and AccountDemo and it worked fine. I guess the author of that tutorial was obviously not working with jdk 1.4.
    As far as using packages, com.kusek.bank would make a good package name then??
    The statement:
    package com.kusek.bank; OR a shorter version package kusek.bank;
    should be added to all three classes and no import statements would then be necessary, right??
    I just remember reading that it should be something unique as a good habit to get into.
    I'm trying to learn enough to make a useful GUI program for a special project so I probably should be using packages anyway when I get to that point.
    My programming backround is limited to procredural languages Basic, QBasic, Pascal, and Fortran and I find myself still wanting to think in those terms. I have read several web sites and worked through some basic examples but I still have much to learn. I once I can grasp how to write OOP style it would be nice to look at code for a somewhat detailed application (like a store checkout app) and have every line explained as to why it's there. I can see where it makes sense to have your GUI classes predefined (Swing), File I/O, serial port communications, and even things like this InterestBearingAccount example that extends from the Account class utilizing its basic attributes but overriding the constructors for the additional parameters (interest calculation) that are passed. How to take a common problem and go about creating a solution is what I need to see being done to help me.
    My telemetry project uses VHF radios with packet radio modems to monitor two diesel engines and turn one off if the other turns off. The modems have built in A/D data gathering and can also output control signals, they just need to be told what to do. I can manually use a Windows Hyperterminal session and type in "connect Engine1" and use commands to determine the A/D inputs "analog". The modems have built in end-to-end acknowledgement so the only think I need is an application than can be setup to run in the Startup folder to handle this. It would use a timer class to "poll" engine1 every 5-10 minutes and if it has stopped (based on the response of the "analog" command) I would "disconnect" from engine1 and "connect" to engine2 and send a "ctrl B off" or something similar. The standard responses from the modem should allow me just to send and recieve STRING data to and from the serial port and parse them as needed. I need at least this much but it shouldn't be too much harder to develop a way to reset the system(reverse of this) when that is required. I could also read a water pressure value at one of the locations and display that on the screen along with the current status of the engines (using values obtained from the "analog" command on the modems).
    The hardest part of OOP programming seems to be knowing what classes are already out there and knowing how to find them or apply them. I hope Swing has classes that provide for displaying values on the Windows taskbar (my motherboard monitor freeware displays temperature readings down on the taskbar). I appreciate all the help given here. It's almost like having a private tutor.
    randy

  • Urgent Need help on DATE Class

    i have written the code
    <page language="java">
    <%@page import="java.util.Date" %>
    <%
         String mydate="10/25/03";
         Date d=new Date(mydate);
         int mon=d.getMonth();
         int day=d.getDay();
         int year=d.getYear();
         out.println(d+","+mon+","+day+","+year);
    %>
    when i execute
    Sat Oct 25 00:00:00 GMT+05:30 2003,9,6,103
    can some one help me, why i am getting different month day and year

    Be aware that you're using deprecated methods of the Date class. If you read the javadoc for those methods you'll discover that the results are correct. The getMonth method returns a zero-offset month with zero representing January. The getDay method returns a zero-offset day of the week (0 = Sunday...6 = Saturday) not the day of the month. Use the getDate method to return day of the month. The getYear method returns a value that is the result of subtracting 1900 from the year.

  • Import data into Numbers from web?

    Is there a way to import data from the internet directly into Numbers without programming/writing an applescript or using a different program?
    Can you do this while using only Numbers and the web?

    And how is Numbers to know how to extract the exact data you want from an external source, unless that source is in a format familiar to Numbers, which HTML isn't? For an automated process like this, you will need scripting, and that means learning to program/understand scripts.
    For example, here's some HTML code from a web page that includes volume data for one symbol:
    <td class="mbi_left" align="left" width="35%">BM&FBOVESPA SA</td><td align="right" width="10%">12.37</td><td align="right" width="10%">0.22</td><td align="right" width="10%">1.81</td><td align="right" width="20%">11,611,700</td><td align="right" width="15%">09/18</td>
    Numbers can't interpret this without being told exactly what to extract. Also, Numbers doesn't go out to the web on its own at fixed intervals (as I suspect you may want) without a program telling it what to do. This is just a spreadsheet after all.

  • Data class is ambiguous

    hi i get the following error when i compile my code. it says that my Date class is ambihuous???
    icomm server\src\icommserver\admin.java:268: reference to Date is ambiguous, both class java.util.Date in java.util and class java.sql.Date in java.sql match..
    here is my code below:
    package icommserver;
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.text.*;
    //get todays date
                     GregorianCalendar thisday = new GregorianCalendar();
                     Date d1 = thisday.getTime();
                     DateFormat df = DateFormat.getDateInstance();
                     today = df.format(d1);

    Did you actually read the compiler's diagnostic? It says this:reference to Date is ambiguous, both class java.util.Date in java.util
    and class java.sql.Date in java.sql match..There are two Data classes in two different packages; when you define
    a Date object, which one do you want? You have to specify this Date
    object using its fully qualified name, i.e. it has to include its full package name.
    kind regards,
    Jos

  • Create a "Date" class & modify, ouput incorrect - why?

    hi,
    Would you mind explaining to me what i did wrong with my code...
    when i run the main() i get:
    ..today . : . tomorrow
    mm/dd/yyyy : mm/dd/yyyy
    12/28/1949 : 00/29/0000
    12/29/1949 : 00/29/0000
    12/30/1949 : 00/29/0000
    12/31/1949 : 00/29/0000
    12/32/1949 : 00/29/0000
    12/33/1949 : 00/29/0000
    Modify the Date class of Fig.8.8 to:
    provide a method nextDay to increment the day by one. The Date object should remain in a constant state. Write a driver program that test the nextDate method in a loop.
    // Fig. 8.8: Date.java
    // Declaration of the Date class.
    //package com.deitel.jhtp3.ch08;
    import javax.swing.JOptionPane;
    public class Date extends Object {
       private int month;  // 1-12
       private int day;    // 1-31 based on month
       private int year;   // any year
       private int nextMonth;  // 1-12
       private int nextDay;    // 1-31 based on month
       private int nextYear;   // any year
       // Constructor: Confirm proper value for month;
       // call method checkDay to confirm proper
       // value for day.
       public Date( int mn, int dy, int yr )
              month = checkMonth( mn );      // validate the month
          year  = checkYear( yr );       // validate the year
          day   = checkDay( dy );        // validate the day
          nextDay = nextDate( month,day,year);
          System.out.println(
             "Date object constructor for date " + toString() );
         //utility method to check month
         private int checkMonth( int testMonth )
              if ( testMonth > 0 && testMonth <= 12 ) // validate the month
             month = testMonth;
          else {
             month = 1;
             System.out.println( "Month " + testMonth +
                                " invalid. Set to month 1." );
          return testMonth;  // leave object in consistent state
         //utility method to check year
         private int checkYear( int testYear )
              if ( testYear > 0 && testYear <= 2002 )
             year = testYear;
          else {
             year = 2002;
             System.out.println( "Year " + testYear +
                                " invalid. Set to year 2002." );
          return testYear;  // leave object in consistent state
       // Utility method to confirm proper day value
       // based on month and year.
       private int checkDay( int testDay )
          int daysPerMonth[] = { 0, 31, 28, 31, 30,
                                 31, 30, 31, 31, 30,
                                 31, 30, 31 };
          if ( testDay > 0 && testDay <= daysPerMonth[ month ] )
             return testDay;
          if ( month == 2 &&   // February: Check for leap year
               testDay == 29 &&
               ( year % 400 == 0 ||
                 ( year % 4 == 0 && year % 100 != 0 ) ) )
             return testDay;
          System.out.println( "Day " + testDay +
                              " invalid. Set to day 1." );
          return 1;  // leave object in consistent state
         private int nextDate( int mon, int da, int yer )
              //add one to day
              //does it start the next month
              //does it start the next year
          int daysEaMonth[] = { 0, 31, 28, 31, 30,
                                 31, 30, 31, 31, 30,
                                 31, 30, 31 };
              nextDay = da + 1;
                   if ( nextDay > daysEaMonth[month]){
                      nextDay = 1;
                      if (mon == 12)
                         nextMonth = 1;
                      else
                         nextMonth = mon + 1;
                      if (nextMonth == 1) nextYear = year + 1;
                   }//end of if nextDay
          return nextDay;
       // Create a String of the form month/day/year
       public String toString()
          { return month + "/" + day + "/" + year +
                   " : " + nextMonth + "/" + nextDay + "/"
                    + nextYear + "\n" ; }
    public static void main( String args[] )
       {   String result = "";
              //Date c = new Date();
          Date d = new Date( 12, 28, 1949 );
          //Date e = new Date( 7, 24, 1949 );
          for (int x = 1; x<6; x++ ){
                   d.day++;
                   result = result + d.toString();
          JOptionPane.showMessageDialog( null,
             //e.toString()+ d.toString(),
             result,
             "Testing Date Class",
             JOptionPane.INFORMATION_MESSAGE );
          System.exit( 0 );
    }//end of class Date
    *****************************************************************/

    ok, will change...
    Question regarding
    "You're not setting the values of nextMonth or nextYear anywhere."
    but i have class variables.....
    private int nextMonth; // <dont these values get assigned from the
    private int nextDay; // <function "nextDate", i mean, heck i thot
    private int nextYear; // <if they were class var's i could assign val
    private int nextDate( int mon, int da, int yer )
         nextDay = da + 1;
         if ( nextDay > daysEaMonth[month]){
            nextDay = 1;
            if (mon == 12)
               nextMonth = 1;
            else
               nextMonth = mon + 1;
            if (nextMonth == 1) nextYear = year + 1;

  • Importing external classes

    How do I import a downloaded .class file to be used in my project? It shows up in the Explorer [filesystems] view but I still get an error.
    BCrowe

    >>
    uh - don't believe so. You don't need an importwhen
    the class is part of the default name space.
    That's not what I've experienced, could you show an
    example of how that's done?
    Show an example of how what is done?
    If the class is in the default name space it has no package.
    So there is no import statement. So I guess an example would be a blank line?
    Amazingly enough I remembered the reason for this.
    The import statement allows the compiler to fully resolve the name, so a developer can use a short hand abbreviation.
    If I want to use 'java.util.Date' then the compiler will need to know the fully qualified name, which is 'java.util.Date'. I can use the full name or I can import it using either 'java.util.*' or 'java.util.Date'.
    And then in my code I can just use 'Date.
    And the compiler will always resolve it to 'java.util.Date'.
    But what happens if I create a 'Date' in the default name space?
    The fully resolved name is 'Date'. There is nothing for the compiler to resolve. There is no shorthand that the developer can use.
    Even if 'import Date' was allowed it doesn't tell the compiler anything that it doesn't already know.
    Further the compiler must look in the default name space anyways. Whether an import statement is there or not.

Maybe you are looking for

  • PI 7.1 EHP1 RFC Lookup- Issue

    Friends, I'm seeing one strange issue in RFC Lookup behavior in my PI 7.1 EHP1 . Please give me some ideas for the same Please see the below image for what I have done and what I'm seeing in the display queue. http://www.flickr.com/photos/8764045@N06

  • Error msql command ... "Unable to create JVM. You need jre/jdk 1.3.1 or hig

    Hi All, I have successfully installed soa 10.1.3.1. I am using VMware with windows xp as os. The problem is occuring when i was trying to apply 1*0.1.3.4 patch* to my 10.1.3.1 installation. In the pre-installation instructions we need to upgrade the

  • Mackbook pro to flat screen tv

    I have a 07 macbook pro if i install lion on it will airplay work from the macbook pro to my flat screen tv ?

  • Low Res Games

    I looked at some of the games in the ovistore, and i was suprised that the quality of the graphics is so low why is it that nokia is behind in many things, but mainly games

  • Lightroom 5.7.1 crashes every time I select a MOV video file, is there a fix?

    This was working in 5.0, after updating to 5.7.1 Lightroom will crash every time I have an MOV file selected. The cover image of the video will render and show, yet LR will crashes and burn. This is on a Windows 8.1 system with Lightroom 5.7.1 and MO