Any ideas about creating persistant object during execution?

As a newbie, I wrote a badly designed applet which is used to share different keys with different devices. Now I got a problem about if the number of devices increased, how to generate new key objects during the execution and store it as a persistant object. I would use a (short) variable to restrict the number of devices and I only know using JCSystem. Transaction to update a byte array. Does anyone has good ideas about this problem?

Could you explain a little more detail about what you are trying to do? Are you allocating a certain amount of space for keys at install time and setting a limit to this or do you plan to allocate memory at runtime as new devices come along? Do you have some sample code to share that would clarify what you are trying to do?
I would suggest creating all your data up front and tracking which keys are allocated.
- Shane

Similar Messages

  • Hey Dears, I was working with my Macbook pro 2011, then i have some flash light in the screen, so i shutdown the computer, when i try to open it again i had a black screen, so any one of you have any idea about what should i have to do ?

    Hey Dears, I was working with my Macbook pro 2011, then i have some flash light in the screen, so i shutdown the computer, when i try to open it again i had a black screen, so any one of you have any idea about what should i have to do ?

    Can you start Firefox in [[Safe mode]] ?
    You can also do a clean reinstall and download a fresh Firefox copy from http://www.mozilla.com/firefox/all.html and save the file to the desktop.
    Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    You can initially skip the step to create a new profile, that may not necessary for this issue.
    See http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • How do I create multiple objects during runtime?

    I don't know how to create multiple objects during runtime, here's my problem:
    I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
    Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
    Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
    For those who want to see a bit of the program:
    public class PlayBalloon{
    public Hashtable ht = new Hashtable();
    for(){
    Balloon pB = newBalloon;
    newBalloon=new Balloon(pB);
    ht.put("Some input from user", newBalloon);
    for(){
    ht.get(s).draw;<= s=string, draw=own meth. in Balloon
    }

    I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
    The way that a hashtable works is as follows...
    When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
    If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
    class ObjectNameKey {
        private String name;
        private int occurence;
        public ObjectNameKey(String name, int occ) {
            this.name = name;
            this.occurence = occ;
        public String getName() {
            return name;
        public String getOccur() {
            return occurence;
        public boolean equals(Object o) {
            if (!(o instanceof ObjectNameKey)) {
                return false;
            ObjectNameKey onk = (ObjectNameKey)o;
            if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
            return false;

  • I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Any idea about the pricing of the hardwares for Oracle 10g RAC?

    Hi,
    If I go for 2 nodes RAC using Dell servers and Disk array, any ideas about the prices? (just for the hardwares.)
    Thanks.
    Regards,
    Jason

    It's all about the shared disk(s).
    If you are only ever going to use two (2) nodes a SCSI JBOD solution is cheap. (practical too with ASM as the cluster filesystem / volume manager)
    More than 2 nodes, you step up to certified NFS, iSCSI or FC/AL connected storage. More expensive, faster, more flexible.
    The computers are the cheapest portion of the cost especially with multiple core multiple cpu 64bit linux based servers being so inexpensive.

  • I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    Hi,
    Please give this a try: Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later)
    Thanks,
    Rameez

  • HT1386 Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    What are you trying to sync?
    I see you are on ios 7.
    I also had upgraded my iPad Mini to ios 7 & then the 1st time I tried to open a Numbers file that was set up to sync w my MacBookPro, I got a warning that I would not be able to sync it any more w my Mac until I upgraded to Mavericks.
    So if you are trying to sync Numbers, Pages or Keynote files between your iPad mini in ios 7 and a Mac that hasn't been upgraded to Mavericks that could be the problem.
    I was very shocked to get that message since I bought Numbers on the iPad so that I could have a particular file on both devices & keep them synced. I had no clue when I upgraded to ios 7 on the iPad Mini that it would make it so the files in the iWorks apps woudln't sync any more.
    So I finally decided to go ahead & upgrade to Mavericks after carefully preparing & updating other software so that it would work w Mavericks. But I got error messages so haven't even been able to download Mavericks & now having 2nd thoughts about doing so.
    iPad mini ios 7
    MacBookPro Mid 2012 Mountain Lion
    iphone 4S ios 6

  • Any Ideas about 1.2 fix? (Scrambled Screen, etc.)

    Anyone have any ideas about how to fix the problems with ipod software 1.2? Does anyone know how to fix the scrambled screen problem or the locking up of the screen, after two months of having to deal with the problem) (iPod software version 1.2 was released on September 12) (other than reverting back to 1.1.2)
    ...yeah, i didn't think so.

    yeah, many of us would like apple to fix this problem. I've stopped buying tv shows off the iTunes store, because I can't get the videos on my iPod without the update. Feh!

  • After updating to Maverick, Photoshop cs6 is freezing up repetitively. The "initializing text tool" progress bar seems to be popping up out of nowhere. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

  • HT1551 When i tried to purchase a movie, My Apple TV said it would take 11 hours to load. Any ideas about what to do or what is going on with that?

    When i tried to purchase a movie, My Apple TV said it would take 11 hours to load. Any ideas about what to do or what is going on with that?

    It always has a very high number at the beginning, but it never takes that long....
    However, it can take several hours....I've found this to be true on any device or computer I've downloaded movies or tv shows on - Mac, PC, iPad, Kindle Fire....you name it.
    However, even if it does take a long time, that does not prevent you from starting to watch it as soon as it has done a little downloading. Here is the Apple link for typical download times:
    http://support.apple.com/kb/HT1577
    Here is a link with Purchased Movie FAQs:
    http://support.apple.com/kb/ht1906#faq24
    Cheers,
    GB

  • After downloading and trying to install the newest version of i tunes on my pc, I got an error message telling me: unable to locate component MSVCR80.dll. Now I can't use the version I had and obviously not the newest version. Any ideas about how to fix ?

    After downloading and trying to install the newest version of i tunes on my pc, I got an error message telling me: unable to locate component MSVCR80.dll. Now I can't use the version I had and obviously not the newest version. Any ideas about how to fix ?

    Solving MSVCR80 issue and Windows iTunes install issues.
    Thanks to user turingtest2 for this solution.
    Solving MSVCR80 issue and Windows iTunes install issues.
    If the above doesn’t do the trick entirely, then use the instructions in the following as it applies to the version of Windows you are using:
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    You may be required to boot into safe mode to complete the folder deletion process.

  • HT201210 dose someone has any idea about error 1015 when trying to restore iphone iOS?

    Dose someone has any idea about error 1015 when trying to restore iphone iOS?

    Error 1015 means the phone was jailbroken. You can not get help here.

  • Any idea about 8.0.5 desupport?

    Any idea about Oracle 8.0.5 desupport?

    I understand the earliest supported db version is 8.1.7 so not much hope for 8.0.5 then.

  • When I opened contacts they were all gone! Any ideas about retrieving them?

    When I opened my contacts they had all disappeared. Any ideas about retrieving them?

    You can restore the contacts from the app that you chose to sync them with on your computer, or from iCloud if you set up iCloud syncing, or from the iCloud backup if you have set up the phone to back up to iCloud, or from the backup on your computer if you chose to back up the phone to your computer, or from the MS Exchange Server if you have an Exchange account set up. If you did none of these they are gone. And probably not because of the text; they were gone before the text.

  • HT3275 Any ideas about this error message?  (error -1)

    Any ideas about this error message?
    "The backup disk image “/Volumes/Data/ MacBook Pro.sparsebundle” could not be accessed (error -1)."

    Standard Lion networking .. Reboot the TC or use the disconnect all users in the AU.. it has not closed the sparsebundle correctly from last time.. or has simply forgotten where the TC is.
    It is reported at least once a day here.
    See C17
    http://pondini.org/TM/Troubleshooting.html

Maybe you are looking for