Please help how to set/get a class object in hashtable or hashmap?

Hi, everybody.
I'd like to generate a class-object list in hashtable.
However, compilation is error. Here is my code:
Hashtable ht = new Hashtable();
Class tmp_obj;
tmp_obj = Class.forName("my_class_name_1");
ht.put("my_class_name_1", tmp_obj);
tmp_obj = Class.forName("my_class_name_2");
ht.put("my_class_name_2", tmp_obj);
Class selected_object = ht.get("my_class_name");
^here compilation error: incompitable types
Could anybody tell me where is wrong in my code and how to
correct it?
Thank you in advance.
Jeff

Look at the javadoc for Hashtable. The get method returns an Object. You will need to cast it to a Class object.
Class selected_object = (Class)ht.get( "my_class_name" );If you are using JDK5.0, then you should look up generics.

Similar Messages

  • Please Help,how do i get my iphone 4 to play all my songs from icloud, it is currently only playing just a smal number of songs from my library which is stored in icloud.

    Please Help,how do i get my iphone 4 to play all my songs from icloud, it is currently only playing just a smal number of songs from my library which is stored in icloud.

    There are a number of OS X apps, many free, that will save your messages, allowing to view and print them. 
    http://www.softwarebbs.com/wiki/How_to_transfer_SMS_from_iPhone_to_Mac,_backup_i Phone_SMS_message_on_Mac
    Google, for other options
    Your "other" of 6 GB may include corrupted data or file sytem errors. If after removing the messages there is still >2GB, you will need to restore the phone in iTunes, first using a backup (made after deleting the messages) and if needed as a new iPhone.
    iTunes: Restoring iOS software

  • For updation of IOS 7.1.1 passcode required,I forget my passcode please help how can I get my passcode

    Hello,
    I forget my passcode please help how can I get my it

    You will need to try to restore your iPad from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try Recovery Mode.
    Read this: http://support.apple.com/kb/ht1808
    Follow the instructions very carefully.

  • Please help how can I get Number of activations changed?

    How can I get my iPads reset for number of activations? I have had an original iPad and two iPad 3 and now 3 iPad Air due to defective tablets.They were replaced for technical issues. I keep getting this message on both devices in BAM2 E_AUTH_BAD_DEVICE_KEY_OR_PKCS12
    I have not even read the book I originally purchased from BAM. Please help.

    They'll know more in the Adobe Digital Editions Forum

  • Please Help, How can I get 24Frame .mov's to work with broadcast footage?

    Hello,
    I am desperate for some help. I have 24 Frame image sequences and 29.97 B-Roll footage that I need to work with. I am forced to work in the B-Roll frame rate because it is a mixture of scenes and all the interlace is different shot to shot.
    So my question is how can I take this 24 Frame CG and get it to 29.97? I can’t conform it in Cinema Tools because it speeds up the timing. I can’t add pull down in After Effects because it looks really bad. Is there any other way that I can add pull down to this footage and have it still look good?
    I am in desperate need for some help so even some conversation might get the ball rolling.
    Thanks in advance

    I'm really surprised that you say it is looking bad out of After Effects since that is a good way to add the pulldown. What is it that is looking bad? Is the comp set up correctly? Is the CG stuff a true 24? You might want to conform it to 23.98 in Cinema Tools, then try adding the pulldown in AE. I don't think it should matter except that you aren't truly pulling down to 30fps so you'll have to change the rate at some point.
    The only other way I know to add the pulldown, is to use FinalCut at a 23.98 sequence, play it out to tape to add the pulldown, then capture it back in.

  • Please help How do I get rid of funtools? it seems to have taken over my home page and although i have tried to delete it from programmes etc it still keeps popping up. I don't even know how it got here!!!!

    I'm sorry I don't have any information it just appeared on here yesterday. Possibly one of the kids downloaded something or my fella. I have removed the toolbars but it still keeps popping up and I get other pop ups although they are disabled. I am not very computer minded/technical, so any help is appreciated.

    go to Fireofx>Addon>Extension and check if any unknown toolbar are installed or not

  • Please Help!!! Getting data to a table

    I am having real problems with this I want a table with a header which lists the contents of a file. In this file on each line there are the header titles eg each line is set out the same just containing different parameters etc Event No: 0     Time Elapsed: 1.0 Event String: Algoritm changed Parameter: algo: Monitoring
    In the table the constructor says Object [][] and Object [] please help how do I get my code to compile.
         FileReader file = new FileReader("c:\\projects\\FirstSupport\\logfile2.txt");
              BufferedReader inputfile = new BufferedReader (file);
              Object[] columnNames = {"Event No",
    "Time Elapsed",
    "Event String",
    "Parameter"};
              Object[] values;
              MessageFormat mf = new MessageFormat("Event No:{0,number} Time Elapsed: {1,number} Event String:{2} Parameter:{3,number}");
              text = "Event No: 0     Time Elapsed: 1.0 Event String: Algoritm changed Parameter: algo: Monitoring";
              while ((Line = inputfile.readLine()) != null);
                   System.out.println(text);
                   values = mf.parse(text);
                   int eventNo = ((Number)values[0]).intValue();
                   double time = ((Number)values[1]).doubleValue();
                   String eventString = (String)values[2];
                   int param = ((Number)values[3]).intValue();
    JTable table = new JTable(values,columnNames);

    Hi,
    where is the problem? Does the part reading the file work? If so I would use a class extending DefaultTableModel .
    Have a look at :
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    Phil

  • I am having email problems with the new Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help

    I am having email problems with the new Mountain Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help
    Incoming Mail (IMAP) Server - requires SSL:
    imap.gmail.com
    Use SSL: Yes
    Port: 993
    Outgoing Mail (SMTP) Server - requires TLS:
    smtp.gmail.com (use authentication)
    Use Authentication: Yes
    Use STARTTLS: Yes (some clients call this SSL)
    Port: 465 or 587
    Account Name:
    your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
    Email Address:
    your full Gmail email address ([email protected]) Google Apps users, please enter username@your_domain.com
    Password:
    your Gmail password
    The Quick Answer
    Follow the instructions below to set up IMAP1 access in most email clients.
    Google Apps users, please follow the default instructions unless otherwise noted, replacing 'your_domain.com' with your actual domain2 name.
    this is all greek to me. WHAT IS STARTTLS? On the first page of Apple set up there is a TLS certificate and it is marked NONE- should I change it to the long APPLE CERT option?  The next page under ADVANCED: THERE IS A BOX SSL MARKED.  Then IMAP Path Prefix - I put stmp.gmail.com.. is that right?  Port 993 can  use this one? as 456 doesn't work and 587 said it wasn't safe.  Under AUTHENTICATION I used PASSWORD.  Should I have used external client cert TLS?
    Please help me set this up securely. Thanks

    Apple - Support - Mail Setup Assistant

  • HT201270 i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    capriz wrote:
    i have just updated my old 3GS ...
    To what... iOS 7 is Not supported on the 3 GS

  • Help Please! How can i get rid of shopper pro from my google chrome browser?

    Help Please! How can i get rid of shopper pro from my google chrome browser?

    Read this document about malware and adware.   The solution is almost certainly within.The Safe Mac
    http://www.adwaremedic.com/index.php
    Incidentally, it would help if you entered details of your products in your profile.   There are different answers for different items with this question.

  • What does hd macintosh full mean please help I am also getting an error message saying start up disk is full i need to free up some space how do i do this please?

    what does hd macintosh full mean please help I am also getting an error message saying start up disk is full i need to free up some space how do i do this please?

    Also, you may find this link of intereset and value...
    http://macmost.com/what-to-do-when-your-hard-drive-is-full.html

  • My ipad2 is asking old id password, when i go to forget password link for that id then I am not getting any mail to reset the same. Please help how can i remove or change the old id.

    my ipad2 is asking old id password, when i go to forget password link for that id then I am not getting any mail to reset the same. Please help how can i remove or change the old id.

    You cannot remove or change the old ID. This is Find My iPhone Activation Lock. You need to recover the credentials for the Apple ID originally used to activate the iPad.
    Check your spam and junk folders.

  • How to set/get the archive file attribute?

    I am programing a (freeware!) ftp client and need to know, how to set/get the archive attribute of a local file. I was searching through whole the i-net - nothing at all!
    please help me!!

    Hi,
    Since not all operating systems support the archive attribute, this ain't included in the JDK.
    If you're using Microsoft Foundation Classes for Java, then you can use File.getAttributes(String path) and check whether the result equals FileAttribute.ARCHIVE.
    For setting the attribute, you can use
    File.setAttributes(String path, FileAttribute.ARCHIVE)
    Of course this is all Microsoft-specific stuff.
    Hope this helps,
    Kurt.

  • Please help : How to print a matrix from the console...

    Hi..
    Please help:
    How to print a matrix on the console , but i want to take all the input from the console.. like...
    if the matrix is of size...
    mxn
    where
    m : row
    n : column
    and the all the elements of the matrix from the console it self... .
    Please help...

    Thanks...
    I am able to print the elements of the array but i am not able to assign those values to the array ....
    How to do that...
    I just did a little change in my code...
    import java.util.Scanner;
    public class CreatingAMatrix {
        public static void main(String[] args) {
         // TODO Auto-generated method stub
         System.out.print("Enter the number of rows: ");
         Scanner scanner1 = new Scanner(System.in);
         int m = scanner1.nextInt();
         System.out.print("Enter the number of coulmns:");
         Scanner scanner2 = new Scanner(System.in);
         int n = scanner2.nextInt();
         System.out.println("The size of the matrix is : " +m+" x "+n );
         int[][] a = new int[100][100];
         for(int i=0;i<=m;i++)
             for(int j =0; j <= n; j++)
              Scanner scanner3 = new Scanner(System.in);
              int o = scanner3.nextInt();
             System.out.println();
         for(int i=0;i<=m;i++)
             for(int j =0; j <= n; j++)
              System.out.print(a[i][j] + "\t");
             System.out.println();
    }I am getting an output as this
    output:
    Enter the number of rows: 2
    Enter the number of coulmns:1
    The size of the matrix is : 2 x 1
    1
    2
    1
    2
    3
    5
    0     0     
    0     0     
    0     0     
    how should i assig those input values to my array..
    Please help

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

Maybe you are looking for

  • Process order confirmation

    Dear Experts, In process order confirmation can we make a kind of restriction through configuration  in which system should not allowed a confirm quantity of phase 20 is not greater than previous confirmed quantity of  phase 10 there is no relationsh

  • Error sync calender and slow mail for Exchange

    I have a Nokia E90 with Exchange Business software. I the last to month i get an error when synchronizing calendar. The phone completely locks with an error message. It is still possible to sync mail and contacts. Today i upgraded the firmware to new

  • Mass uninstall of CC apps

    With the release of CC 2014 is there a way to do a mass uninstall of the original CC apps? I only see individual uninstallers in the app folders. This is not going to work for the 50+ creative systems I manage. I could do a terminal command but tryin

  • SnowLeopard & CS4, Dual Display (Open GL not checked) bad color problems...

    I was hoping 10.6.2 might shake it but no luck...at all. The menu bar is on my Apple Cinema Display 23". Eizo is the 2nd monitor (my main visual monitor -- and things seem normal on this display), but I often have reference photos open on the ACD, an

  • Can't get my mail when use the USB Ethernet adapter

    I can't get my mail when use the Apple USB Ethernet Adapter. If I use a wireless connection, there is no problem. The LAN which I'm trying to connect is behind a proxy server but the Internet is working 100%.