Event help please!!!

Hello
In a game I am currently making I have had some problems with The keyPressed() and keyReleased() methods. If i press spacebar to fire (its in keyReleased()) while i'm moving, my ship will stop (since the moving is controlled with keyPressed()). Also, on my computer I can move diagonally (ie hold two keys at once) but on my friends computer he can't. Third, my high score screen glitches if SHIFT is held down. So here are my questions:
Is there any way to use keyPressed() and keyReleased() at the same time, or do they always conflict?
Why is my friend's computer not registering two keyPressed()s at the same time, and is there any way i can fix this?
Is there any way to check if a key pressed/released/hit is a key that gives a valid ASCII character?
Any help is truly appreciated!!!

You need another thread I am betting. You should not do any work in the event thread. just get the data out of the event thread but your work should all be done in another thread, or else just what you are talking about will happen. when the event thread is interrupted, your app will stop.

Similar Messages

  • Upgraded to Iphoto 9.5 now all my photos are in one event - Help please

    I upgraded to iphoto 9.5.1 with the Mavericks update. Now all my photos (8,217) are in one event. I spent hours breaking them down into different events and now it's back to one. I tried repairing and rebuilding the database per other forum discussions but nothing changes.
    I'd love some advice on how to re-organize the photos without having the manually recreate all the events.
    Thank you!

    Thank you. All my event headings are gone but at least it's separated by date.
    I followed the instruction from some other discussion threads, held down option + command and tried the options to fix the library that way - it didn't make a difference.
    Thank you for your help. Guess I better but everything in albums since those are still ok.

  • After downloading the new operating system to my 3GS, all the events in my calender are doubled!!   HELP PLEASE!

    after downloading the new operating system to my 3GS, all the events in my calender are doubled!!   HELP PLEASE!

    did you find a solution for this?

  • When I add an event to calendar on my iphone, it updates on my MacBook Pro.  But when I add it on my Mac, it does not update on my iPhone.  Help please.

    When I add an event to calendar on my iphone, it updates on my MacBook Pro.  But when I add it on my Mac, it does not update on my iPhone.  Help please.

    Change your time zones in the settings,  They are not on the same time zones.

  • HOME HUB - EVENT LOG - TECHNICAL HELP PLEASE

    Hello. I am trying to investigate why my BB usage is so high and have come across some recorded event entries in the 'event log' which I would like explained. Is there an expert/moderator  who can help please? What I am trying to establish is whether these entries could mean that there are outside users, using our broadband via P2P/Skype etc?. Many thanks.  n.b None of the names are known to me.
    VOIP: [2.0A] [john] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [john] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [daniel] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [daniel] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [Amanda] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [Amanda] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [andrew] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [andrew] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [jennifer] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [jennifer] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [newuser] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [newuser] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [computer] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [computer] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [calvin] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [calvin] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [charles] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [charles] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [paul] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [paul] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [dave] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [dave] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [steve] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [steve] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [tsinternetusers] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [tsinternetusers] [-] REGISTER - SIP message received
    13:31:32  16 Aug
    VOIP: [2.0A] [tsinternetuser] [] 501 Not Implemented - SIP message sent
    13:31:32  16 Aug
    VOIP: [2.0A] [tsinternetuser] [-] REGISTER - SIP message received

    Ditto - http://community.bt.com/t5/BB-in-Home/I-guess-this​-is-not-normal/m-p/12705#M7403
    (note this was on 03/04/10 after I had manually turned OFF BBT).
    IanC did provide a plausible reason on the above link
    -+-No longer a forum member-+-

  • IMove 9... Project cannot locate clips after I chose "Split Event Before Clip." Help please!

    iMovie 9; chose "Spit Event Before Clip." Project now cannot locate Event clips for that Project. All Events and Clips are on an extenal HD. All I see are !-points for all clips in the Project. Help!
    I noticed another Event folder for the same clips so I "Merged" them. Still nothing. I've had nothing but problems with the waaay overdue project. I really need some help, please!
    gb

    I'd even gladly pay someone to walk me through this on the phone! I'm really desperate at this point!
    gb

  • Intranet DOWN!! Help, please!! I installed SP2010 SP2 and the Configuration Wizard Stopped at Step 5. I found errors 100 and 104 in the Event Viewer!

    Hi, 
    Help, please.
    Intranet DOWN!! Help, please!! I installed SP2010 SP2 and the Configuration Wizard Stopped at Step 5. I found errors 100 and 104 in the Event Viewer!
    Acording to these entries:
    http://blogs.technet.com/b/sbs/archive/2011/08/19/two-commands-you-should-always-run-first-when-troubleshooting-companyweb.aspx
    https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fwww.techtask.com%2Fsharepoint2010%2Ffehlermeldungen-nach-sharepoint-2010-service-pack-1-installation%2F
    In order to fix this, I need to run:
    PSConfig.exe -cmd upgrade b2b -force -inplace -cmd application content -install -cmd install features
    But SP doesn’t recognize “b2b”.  is the the content or config db?
    Thanks in advanced

    Your Syntax is bad. b2b should follow -inplace, it doesn't make sense anywhere else in the command. Have a look here for more detail:
    https://technet.microsoft.com/en-us/library/cc263093%28v=office.14%29.aspx?f=255&MSPPError=-2147217396

  • I cannot open my Safari. I double click and still loading forever an ever. I cannot get to any preferences at the configurations bar. Any help please?What should a i do to fixe that?

    I cannot open my Safari. I double click and still loading forever an ever. I cannot get to any preferences at the configurations bar. Any help please?What should a i do to fixe that?

    I saw on another post you have asked about this dates LINC DAVIS:
    Date/Time:       2014-07-01 19:03:59 -0300
    OS Version:      10.7.5 (Build 11G63)
    Architecture:    x86_64
    Report Version:  9
    Command:         Safari
    Path:            /Applications/Safari.app/Contents/MacOS/Safari
    Version:         6.1.5 (7537.77.4)
    Build Version:   1
    Project Name:    WebBrowser
    Source Version:  7537077004000000
    Parent:          launchd [203]
    PID:             624
    Event:           hang
    Duration:        1.46s
    Steps:           15 (100ms sampling interval)
    Pageins:         7
    Pageouts:        0
    Process:         Safari [624]
    Path:            /Applications/Safari.app/Contents/MacOS/Safari
    Architecture:    x86_64
    UID:             501
      Thread 0x1597a      DispatchQueue 1
      User stack:
        15 ??? (in Safari) [0x10557ff2c]
          15 SafariMain + 266 (in Safari) [0x10577947c]
            15 NSApplicationMain + 867 (in AppKit) [0x7fff8b559eac]
              15 -[NSApplication run] + 470 (in AppKit) [0x7fff8b2dd9b9]
                15 -[BrowserApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 161 (in Safari) [0x1055e44d5]
                  15 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 (in AppKit) [0x7fff8b2e107d]
                    15 _DPSNextEvent + 1247 (in AppKit) [0x7fff8b2e19c5]
                      15 AEProcessAppleEvent + 102 (in HIToolbox) [0x7fff82c85b69]
                        15 aeProcessAppleEvent + 250 (in AE) [0x7fff832b89f7]
                          15 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 38 (in AE) [0x7fff832b8b03]
                            15 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 200 (in AE) [0x7fff832b8c25]
                              15 _NSAppleEventManagerGenericHandler + 105 (in Foundation) [0x7fff896ed5dc]
                                15 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 283 (in Foundation) [0x7fff896ed74e]
                                  15 __-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke_1 + 101 (in Foundation) [0x7fff896ee7c7]
                                    15 -[NSObject performSelector:withObject:withObject:] + 65 (in CoreFoundation) [0x7fff81947541]
                                      15 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 330 (in AppKit) [0x7fff8b2e45b9]
                                        15 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 227 (in AppKit) [0x7fff8b2e4849]
                                          15 -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completion Handler:] + 193 (in AppKit) [0x7fff8b2e49f9]
                                            15 _NSPersistentUIFinishAcquiringTalagentWindows + 93 (in AppKit) [0x7fff8b3108cb]
                                              15 copyTalagentWindowsAcquisitionBlock + 79 (in AppKit) [0x7fff8b310947]
                                                15 +[NSBundle mainBundle] + 55 (in Foundation) [0x7fff896e1bb9]
                                                  15 -[NSRecursiveLock lock] + 25 (in Foundation) [0x7fff896badf9]
                                                    15 __psynch_mutexwait + 10 (in libsystem_kernel.dylib) [0x7fff87733bf2]
      Kernel stack:
        15 psynch_mtxcontinue + 0 (in mach_kernel) [0xffffff800059eb20]
      Thread 0x1599d      DispatchQueue 2
      User stack:
        15 _dispatch_mgr_thread + 54 (in libdispatch.dylib) [0x7fff8ae7e316]
          15 kevent + 10 (in libsystem_kernel.dylib) [0x7fff877347e6]
      Kernel stack:
        15 kqueue_scan + 416 (in mach_kernel) [0xffffff800053b4d0]
      Thread 0x159a4   
      User stack:
        15 thread_start + 13 (in libsystem_c.dylib) [0x7fff8d3eeb75]
          15 _pthread_start + 335 (in libsystem_c.dylib) [0x7fff8d3eb8bf]
            15 _ZN3WTFL19wtfThreadEntryPointEPv + 15 (in JavaScriptCore) [0x105e2da3f]
              15 WebCore::IconDatabase::iconDatabaseSyncThread() + 303 (in WebCore) [0x106958faf]
                15 WebCore::IconDatabase::syncThreadMainLoop() + 491 (in WebCore) [0x10695c39b]
                  15 __psynch_cvwait + 10 (in libsystem_kernel.dylib) [0x7fff87733bca]
      Kernel stack:
        15 psynch_cvcontinue + 0 (in mach_kernel) [0xffffff800059e920]
      Thread 0x159a9   
      User stack:
        15 thread_start + 13 (in libsystem_c.dylib) [0x7fff8d3eeb75]
          15 _pthread_start + 335 (in libsystem_c.dylib) [0x7fff8d3eb8bf]
            15 thread_fun + 24 (in QuartzCore) [0x7fff81e65d35]
              15 CA::Render::Server::server_thread(void*) + 184 (in QuartzCore) [0x7fff81e65df5]
                15 mach_msg_trap + 10 (in libsystem_kernel.dylib) [0x7fff8773267a]
      Kernel stack:
        15 ipc_mqueue_receive_continue + 0 (in mach_kernel) [0xffffff8000215930]
      Thread 0x159b2   
      User stack:
        15 thread_start + 13 (in libsystem_c.dylib) [0x7fff8d3eeb75]
          15 _pthread_start + 335 (in libsystem_c.dylib) [0x7fff8d3eb8bf]
            15 __NSThread__main__ + 1575 (in Foundation) [0x7fff8970f6a2]
              15 -[NSThread main] + 68 (in Foundation) [0x7fff8970f72a]
                15 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 335 (in Foundation) [0x7fff8971afd7]
                  15 CFRunLoopRunSpecific + 230 (in CoreFoundation) [0x7fff818e9486]
                    15 __CFRunLoopRun + 1204 (in CoreFoundation) [0x7fff818e9c74]
                      15 __CFRunLoopServiceMachPort + 188 (in CoreFoundation) [0x7fff818e150c]
                        15 mach_msg_trap + 10 (in libsystem_kernel.dylib) [0x7fff8773267a]
      Kernel stack:
        15 ipc_mqueue_receive_continue + 0 (in mach_kernel) [0xffffff8000215930]
      Thread 0x159b7   
      User stack:
        15 thread_start + 13 (in libsystem_c.dylib) [0x7fff8d3eeb75]
          15 ??? (in Safari) [0xdeadbeef]
            15 dlopen + 540 (in dyld) [0x7fff65188657]
              15 dyld::runInitializers(ImageLoader*) + 97 (in dyld) [0x7fff651821b9]
                15 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 59 (in dyld) [0x7fff6518d0b7]
                  15 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 237 (in dyld) [0x7fff6518c2cd]
                    15 _ZN4dyldL12notifySingleE17dyld_image_statesPK11ImageLoader + 226 (in dyld) [0x7fff65180973]
                      15 load_images + 233 (in libobjc.A.dylib) [0x7fff8897636b]
                        15 call_load_methods + 161 (in libobjc.A.dylib) [0x7fff889766ca]
                          15 +[VSearchLib load] + 92 (in libVSearchLoader.dylib) [0x109b72bf4]
                            15 -[NSBundle principalClass] + 41 (in Foundation) [0x7fff8970ed84]
                              15 -[NSBundle load] + 18 (in Foundation) [0x7fff897173f8]
                                15 objc_msgSend_vtable3 + 24 (in libobjc.A.dylib) [0x7fff889780d8]
      Kernel stack:
        15 hndl_alltraps + 225 (in mach_kernel) [0xffffff80002da481]
          15 user_trap + 711 (in mach_kernel) [0xffffff80002c4017]
            15 exception_triage + 149 (in mach_kernel) [0xffffff8000220e15]
              15 exception_deliver + 766 (in mach_kernel) [0xffffff8000220c1e]
                15 exception_raise_state_identity + 325 (in mach_kernel) [0xffffff8000249c75]
                  15 mach_msg_rpc_from_kernel_body + 277 (in mach_kernel) [0xffffff80002239d5]
                    15 ipc_mqueue_receive + 70 (in mach_kernel) [0xffffff8000215886]
                      15 thread_block_reason + 299 (in mach_kernel) [0xffffff800022f42b]
                        15 thread_continue + 1661 (in mach_kernel) [0xffffff800022f1ad]
                          15 machine_switch_context + 361 (in mach_kernel) [0xffffff80002c2939]
      Binary Images:
             0x10557f000 -        0x10557ffff  com.apple.Safari 6.1.5 (7537.77.4) <1144E535-39EB-3DD2-8326-F931E2CEDFC5> /Applications/Safari.app/Contents/MacOS/Safari
             0x105589000 -        0x105ac2fff  com.apple.Safari.framework 7537 (7537.77.4) <079F7B57-311E-3A81-B3ED-B7AC3F78E262> /System/Library/StagedFrameworks/Safari/Safari.framework/Safari
             0x105e24000 -        0x1061cbff7  com.apple.JavaScriptCore 7537 (7537.77.1) <C0C6D15C-8C26-3FD8-BE2E-7A1C20B46359> /System/Library/StagedFrameworks/Safari/JavaScriptCore.framework/JavaScriptCore
             0x106953000 -        0x107a00ff7  com.apple.WebCore 7537 (7537.77.4) <E0176EFF-835E-3B32-909D-E3A426947476> /System/Library/StagedFrameworks/Safari/WebCore.framework/WebCore
             0x109b72000 -        0x109b73fff  libVSearchLoader.dylib ??? (???) <2DF78468-AB4B-363E-A838-D4CE14679E8B> /System/Library/Frameworks/VSearch.framework/Versions/A/Libraries/libVSearchLoa der.dylib
          0x7fff6517f000 -     0x7fff651b3baf  dyld ??? (???) <C58DAD8A-4B00-3676-8637-93D6FDE73147> /usr/lib/dyld
          0x7fff818b1000 -     0x7fff81a85ff7  com.apple.CoreFoundation 6.7.2 (635.21) <62A3402E-A4E7-391F-AD20-1EF20236CE1B> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
          0x7fff81e63000 -     0x7fff82003ff7  com.apple.QuartzCore 1.7 (270.5) <19E5E0AB-DAA9-3F97-988C-D9A46AFB9C04> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
          0x7fff82c75000 -     0x7fff82fa1fff  com.apple.HIToolbox 1.9 (???) <CCB32DEA-D0CA-35D1-8019-E599C8007AB6> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
          0x7fff832b5000 -     0x7fff832f4fff  com.apple.AE 527.7 (527.7) <B82F7ABC-AC8B-3507-B029-969DD5CA813D> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.fram ework/Versions/A/AE
          0x7fff8771d000 -     0x7fff8773dfff  libsystem_kernel.dylib ??? (???) <66C9F9BD-C7B3-30D4-B1A0-03C8A6392351> /usr/lib/system/libsystem_kernel.dylib
          0x7fff8896d000 -     0x7fff88a51e5f  libobjc.A.dylib ??? (???) <871E688B-CF57-3BC7-80D6-F6476DFF109B> /usr/lib/libobjc.A.dylib
          0x7fff896b5000 -     0x7fff899cefff  com.apple.Foundation 6.7.2 (833.25) <22AAC369-B63C-3C55-8AC6-C3ECBA44DA7B> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
          0x7fff8ae7c000 -     0x7fff8ae8afff  libdispatch.dylib ??? (???) <8E03C652-922A-3399-93DE-9EA0CBFA0039> /usr/lib/system/libdispatch.dylib
          0x7fff8b2d9000 -     0x7fff8bedffff  com.apple.AppKit 6.7.5 (1138.51) <44417D02-6123-3FC3-A119-CE51BB4C3006> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
          0x7fff8d39d000 -     0x7fff8d47afef  libsystem_c.dylib ??? (???) <41B43515-2806-3FBC-ACF1-A16F35B7E290> /usr/lib/system/libsystem_c.dylib

  • I dont know how i got my photos to my ipod touch from my pc and now i wanna delete them but couldn't. so need help. please let me know.

    i dont know how i got my photos to my ipod touch from my pc and now i wanna delete them but couldn't. so need help. please let me know.

    To turn off auto sync - launch iTunes and go to Edit>Preferences>Devices - check the box at the bottom that says - Prevent iPod, iPhones and iPads from syncing automatically. Click OK and then quit iTunes.
    Connect your iDevice to your PC.
    Launch iTunes,
    Click on the device name on the left side of the iTunes Window.
    Click on the Photos Tab in the iTunes window on the right.
    Untick all of the photos or albums that you want to remove.
    Click on Apply in the lower right corner of iTunes
    If you untick or uncheck the Sync Photos heading and then click Apply it will remove all of the photos from the device when it syncs. In this screenshot - I have only certain albums and events selected to sync.

  • LR6 freezing on full screen. Help please?

    I have just got LR6 (WINDOWS 64x). When I use the Full Screen (or F key shortcut) I cannot exit the full screen without using Task Manager (Ctrl/Alt/Delete)and ending task (ie, LR). When I do this LR closes without saving, or having the option to save, the catalogue. This is most frustrating and time wasting. Also now do not have the ability to view images on the full screen. LR6 works OK providing that I don't use the full screen option. I have also noticed that the image processing/loading is noticeably slower. My graphics processor checks out OK. Help please???

    I'm sorry, but I am a bit out of ideas here.
    I suppose the rest of your system like RAM is well enough too.
    Does the Windows event log have any entry after the freeze? Too bad it's not BSOD - that would at least show a hint where the issue might be.
    FWIW, I'd try with an older graphic card driver as well - you never know.

  • Opening dbs thru button events, help, i`m a newbie..

    i have the following fn for opening the db
    public static void main(String args[]) throws Exception
    new login(new javax.swing.JFrame(), true).show();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    open();
    select();
    static void open() throws SQLException
    // ODBC data source name
    String dsn = "jdbc:odbc:dslogin";
    String user = "";
    String password = "";
    // Connect to the database
    con = DriverManager.getConnection(dsn, user, password);
    // Shut off autocommit
    con.setAutoCommit(false);
    static void select() throws SQLException
    Statement stmt; // SQL statement object
    String query; // SQL select string
    ResultSet rs; // SQL query results
    boolean more; // "more rows found" switch
    query = "select user,password from dblogin";
    stmt = con.createStatement();
    rs = stmt.executeQuery(query);
    // Check to see if any rows were read
    more = rs.next();
    if (!more) {
    System.out.println("No rows found.");
    return;
    // Loop through the rows retrieved from the query
    while (more)
    // System.out.println("kkkk");
    System.out.println("umm" + rs.getString("user"));
    System.out.println("ummmm" + rs.getString("password"));
    more = rs.next();
    rs.close();
    stmt.close();
    now my problem is this..while the above open and select fns work fine in void main, i`m trying to open the db upon clicking a button..heres what i tried to do :
    cmdsubmit.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    cmdsubmitActionPerformed(evt);
    private void cmdsubmitActionPerformed(java.awt.event.ActionEvent evt) {
    open();
    seelct();
    when i try it i get the error message exceptions must be caught or throw or sumthing like that and i`m new to java so i`ve no idea how to go about doing it..help please..

    On JDBC:
    You only need to register a driver with the DriverManager once, and this is done (by JDBC conform drivers) when the driverclass is loaded. You may want to do this in a static initializer:
    import java.sql.*;
    class MyClass{
        static {
            try {
                // load driver class, which automatically registers itself
                Class.forName("sun.jdbc....");
            } catch(Exception ex) { /* handle it, throw error */ }
        // later
        Connection con = DriverManager.getConnection(...);
    }Even better is NOT to hard-code the driver at all. Use
    java -Djdbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver;oracle.jdbc.OracleDriver MyClassinstead.
    Fritz

  • I want to use my maps... But it says that it cannot determined my location...how can I use it? Help please...thanks

    I want to use my maps... But it says that it cannot determined my location...how can I use it? Help please...thanks

    Do you have location services turned on? See Settings > Privacy > Location Services
    In any event Maps can be used to obtain directions by supplying the start and end locations after touching "Directions" in the upper left corner.

  • HELP PLEASE HELP! urgent question with an easy answer!!!!

    Hello;
    I designed a JFrame game, that uses gif files as ImageIcons. The game works perfectly when I run it from console with the java.exe command.
    However; now I want to create a wraparound and run the JFrame in the Internet Explorer from an applet. So I created a new file that extends JApplet; this new file creates a new object of the JFrame-game's class and show()'s it.
    And I created an HTM file that runs the JApplet class. However, the internet explorer cannot open the applet because it has trouble loading the pictures (gif files). How can I load the pictures from my applet for my frame???
    I dont want to change the Java security file. I just want to make the images accessible by my applet. I cannot use commands like setImage in my applet because my JFrame sets the Images.
    (I repeat)My JApplet only invokes an object of my JFrame class and shows it.
    PLEASE HELP PLEASE PLEASE..
    Thanks..

    OK; let me tell you the whole thing. My pictures are in the same folder for sure.
    My JFrame reads pictures and assigns JButtons pictures. when I run the frame there are 16 buttons with the same picture, and when I click the buttons there is a listener in the JFrame that changes the pictures. Simply put, the JFrame has no trouble finding and loading the pictures.
    Then I created a JApplet as follows:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MemoryApplet extends JApplet
    public void init ()
         GameFrame ce = new GameFrame ();
         ce.show ();
    GameFrame is the name of the JFrame class. Then when I try to open the applet using IE, it gives the following error:
    Exception: java.security.AccessControlException: (javax.io.FilePermission back.gif read)
    back.gif is one of the gif files that are used in GameFrame

  • Help with loading dynamic classes ..need help please

    i'm trying to design a program where by i can load dynamic classes
    the problem i'm getting is that only one class is loading.
    classes are loaded by their names,and index numbers of public methods from a linklist
    .When the program runs only the first class is ever loaded and only the methods of that class ..
    help please
    //class loader
    import java.lang.reflect.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class Test2 extends Thread
         public Class c;
         public Class Ray;
         public Class[] x;
         public static Object object = null;
         public Method[] theMethods;
         public static Method[] method,usemethod;
         public int methodcount;
         public static int MethodCt;     
         public static JList list;
    public Method[] startClass(String SetMethodName)
         try
              c = Class.forName(SetMethodName);
              object = c.newInstance();
              theMethods = c.getDeclaredMethods();
              // number of methods
              //methodcount = theMethods.length;
         catch (Exception e)
              e.printStackTrace();
    // return the array then invoke the particular method later
    return theMethods ;
    public void RunMethod(Method[] SomeMethod, int methodcount)
         try
              SomeMethod[methodcount].invoke( object,null );
         catch (Exception e)
              e.printStackTrace();
    // end class loader
    //main calling program
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing .*;
    import java.lang.reflect.*;
    public class JFMenu extends JFrame
         public static JMenu pluginMenu;
         public static JMenuBar bar;
         public static final Test2 w = new Test2();
    public static Method[] setmethod;
    private static ClassLinkList startRef = null;
    private static ClassLinkList linkRef3 = null;
    private static ClassLinkList startRef2 = null;
    private String ClassName,ShortCut;
    private int MethodNumber;
    private JMenuItem PluginItem;
         JFMenu()
              super (" JFluro ");     
              JMenu fileMenu = new JMenu("File");
              fileMenu.setMnemonic('F');
              JMenuItem exitItem = new JMenuItem("Exit");
              exitItem.setMnemonic('X');
              fileMenu.add(exitItem);
              exitItem.addActionListener
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             System.exit(0);
              JMenu pluginMenu = new JMenu("Plugins");
              pluginMenu.setMnemonic('P');
              startRef = new ClassLinkList ("Hello","Hello ",2,1926,"Painter");
              addToList("Foo","Foo ",0,1930,"Author");
              while (startRef.linkRef5 != null)
                   //pluginMenu.addSeparator();
                   ClassName = startRef.linkRef5.className;
                   ShortCut = startRef.linkRef5.shortcutName;
    MethodNumber = startRef.linkRef5.methodNumber;
    AddMenuItem(pluginMenu,ShortCut,ClassName,MethodNumber);
                   startRef.linkRef5 = startRef.linkRef5.next;
              // create menu bar and add JFMenu window to it
              JMenuBar bar = new JMenuBar();
              setJMenuBar(bar);
              bar.add(fileMenu);
              bar.add(pluginMenu);
              //attributes for JFMenu frame
              setSize(500,200);
              setVisible(true);
         }// end JFMenu constructor
         public void AddMenuItem(JMenu MainMenu, String shortcut,String className, final int methodCount )
              if (MainMenu==null)
                   return;
              //JMenuItem item;
              JMenuItem item = new JMenuItem(shortcut);
              MainMenu.add(item);
              setmethod = w.startClass(className);
              item.addActionListener
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             w.RunMethod(setmethod,methodCount);
              //item.addActionListener(ij);
         public JMenuItem AddMenuItem2(JMenu MainMenu, String shortcut)
              //if (MainMenu==null)
              //     return Main;
              //JMenuItem item;
              JMenuItem item = new JMenuItem(shortcut);
              MainMenu.add(item);
              //setmethod = w.startClass(className);
              //item.addActionListener(this);
                   new ActionListener()
                        public void actionPerformed(ActionEvent event )
                             w.RunMethod(setmethod,methodCount);
              //item.addActionListener(ij);
         return item;
         public void ReloadMenu(JMenuBar Bar, JMenu PluginMenu)
              if (Bar==null)
                   return;
              //     setJMenuBar(Bar);
              Bar.add(PluginMenu);
              //item.addActionListener(ij);
    public static void main (String args[])
              JFMenu menapp = new JFMenu();
    public static void addToList(String clname, String shcutname, int metnumber, int year2,
                                  String description) {
         // Create instance of class ClassLinkList
    ClassLinkList newRef = new ClassLinkList(clname,shcutname,metnumber,year2,
                                       description);
    // Add to linked list;
         startRef = startRef.addRecordToLinkedList(newRef);
    // end main calling program
    class Hello extends Thread
    public int getNum()
    System.out.println("I can be ");
    return 5;
    public void rayshowName()
    System.out.println("anything i want ");
    public void rayshowName3()
    System.out.println("to be ");
    class Foo extends Thread
    public int getNum()
    System.out.println("IMHOFF");
    return 5;
    public void rayshowName()
    System.out.println("raYMOND");
    // FAMOUS PERSONS LINKED LIST EXAMPLE
    // Frans Coenen
    // Saturday 15 January 2000
    // Depaertment of Computer Science, University of Liverpool
    class ClassLinkList {
    /* FIELDS */
    public String className;
    public String shortcutName;
    public int methodNumber;
    public int yearOfDeath;
    public String occupation;
    public ClassLinkList next = null;
    public ClassLinkList linkRef5 = this;
    public ClassLinkList startRef = null;
    /* CONSTRUCTORS */
    /* FamousPerson constructor */
    public ClassLinkList(String classname, String shortcutname, int methodnumber, int year2,
                                  String description) {
         className = classname;
         shortcutName = shortcutname;
         methodNumber = methodnumber;
         yearOfDeath = year2;
         occupation = description;
         next = null;
    /* METHODS */
    /* Output famous person linked list */
    public void outputClassLinkedList()
         //public ClassLinkList outputClassLinkedList() {
         ClassLinkList linkRef = this;
         // Loop through linked list till end outputting each record in turn
    while (linkRef != null)
         //System.out.println(linkRef5);
         System.out.println(linkRef.className + ", " + linkRef.shortcutName +
                   " (" + linkRef.methodNumber + "-" + linkRef.methodNumber +
                   "): " + linkRef.occupation);
         linkRef = linkRef.next;     
    //return linkRef;
    //public String ShowCasname()
    //return String ;     
    /* Add a new record to the linked list */
    public ClassLinkList addRecordToLinkedList(ClassLinkList newRef) {
         ClassLinkList tempRef, linkRef;
         // Test if new person is to be added to start of list if so return
    if (newRef.testRecord(this) ) {
         newRef.next = this;
         return(newRef);
         // Loop through remainder of linked list
         tempRef = this;
         linkRef = this.next;
         while (linkRef != null) {
         if (newRef.testRecord(linkRef)) {
         tempRef.next = newRef;
              newRef.next = linkRef;
              return(this);
         tempRef = linkRef;
         linkRef = linkRef.next;
    // Add to end
    tempRef.next = newRef;
         return(this);
    /* Delete a record from the linked list given the first and last name. Four
    posibilities:
    1) Record to be deleted is at front of list
    2) Record to be deleted is at end of list
    3) Record to be deleted is in middle of list
    4) Record not found. */
    public ClassLinkList deleteRecord(String lName, String fName) {
    ClassLinkList tempRef, linkRef;
    // Record at start of list
    if ((this.className == lName) & (this.shortcutName == fName))
         return(this.next);
         // Loop through linked list to discover if record is in middle of list.
         tempRef = this;
    linkRef = this.next;
    while (linkRef != null) {
         if ((linkRef.className == lName) & (linkRef.shortcutName == fName)) {
    tempRef.next = linkRef.next;
    return(this);
    tempRef = linkRef;
    linkRef = linkRef.next;
    // Record at end of list, or not found
    if ((linkRef.className == lName) & (linkRef.shortcutName == fName))
                        linkRef = null;
         else System.out.println("Record: " + lName + " " + fName + " not found!");
         return(this);
    /* TEST METHODS */
    /* Test whether new record comes before existing record or not. If so return
    true, false otherwise. */
    private boolean testRecord(ClassLinkList existingRef) {
         int testResult = className.compareTo(existingRef.className);
         if (testResult < 0) return(true);
         else {
         if ((testResult == 0) & (shortcutName.compareTo(existingRef.shortcutName) < 0 ))
                             return(true);
         // Return false
         return(false);
         public void addToList(String clname, String shcutname, int metnumber, int year2,
                                  String description)
         // Create instance of class Famous Person
    ClassLinkList newRef = new ClassLinkList(clname,shcutname,metnumber,year2,
                                       description);
    // Add to linked list;
         startRef = startRef.addRecordToLinkedList(newRef);

    I have a similar problem. I am writing a program to read the class names from database and instantiate several classes which extends from ServiceThread (an abstract class extending from Thread).
    rs = pStmt.executeQuery();
    while(rs.next()) {
    String threadclassname = rs.getString("classname").trim();
    try{
    ServiceThread threadinstance = (ServiceThread)Class.forName(threadclassname).newInstance();
    }catch ...
    So far, only the first class is ever instantiated and runs fine. But subsequent classes do not even get pass the "... ... Class.forName(...).newInstance();" line.
    Funny thing is that there are also no exceptions. The JVM just seem to hang there.

  • Blast speed is currently 2 Mbps/9 Mbps on the Comcast Speed Test. Help please!

    I've had the Blast service for quite some time, and have noticed painfully slow internet browsing for the last couple of months. I mean...pull-my-hair-out-slow.  I just did a Comcast speed test and the results were 2.31 Mpbs and 9.01 Mpbs. Um....that would explain things. But not really... as I'd love to see the speeds I'm supposed to have. Even double digits would be nice! I'm trying to run ShaperProbe but I get the error "Servers are busy. Try again later." I've tried a few times. I'll post the results if I can get the scan to work. Power level is 45-46 dBmV and SNR 35-37 Modem: ARRIS Motorola SurfBoard SB6141 DOCSIS 3.0Logs of June 2015 (the most recent, and the logs before that are January): Jun 22 2015 07:07:243-CriticalT05.0SYNC Timing Synchronization failure - Loss of Sync;CM-MAC=b8:16:19:fa:b8:0c;CMTS-MAC=00:1d:70:af:fd:a0;CM-QOS=1.1;CM-VER=3.0;Jun 18 2015 08:04:503-CriticalR02.0No Ranging Response received - T3 time-out;CM-MAC=b8:16:19:fa:b8:0c;CMTS-MAC=00:1d:70:af:fd:a0;CM-QOS=1.1;CM-VER=3.0;Jun 18 2015 07:08:273-CriticalT05.0SYNC Timing Synchronization failure - Loss of Sync;CM-MAC=b8:16:19:fa:b8:0c;CMTS-MAC=00:1d:70:af:fd:a0;CM-QOS=1.1;CM-VER=3.0;Jun 17 2015 23:08:553-CriticalR02.0No Ranging Response received - T3 time-out;CM-MAC=b8:16:19:fa:b8:0c;CMTS-MAC=00:1d:70:af:fd:a0;CM-QOS=1.1;CM-VER=3.0;Jun 16 2015 02:43:065-WarningZ00.0MIMO Event MIMO: Stored MIMO=-1 post cfg file MIMO=-1;CM-MAC=b8:16:19:fa:b8:0c;CMTS-MAC=00:1d:70:af:fd:a0;CM-QOS=1.1;CM-VER=3.0; I would sure appreciate any ideas. I have not contacted tech support yet, although that may be faster??  We'll see.  Thanks in advance for any help!  

    ShaperProbe has not been usable for some time, unfortunately. Check to see if Comcast is reporting an outage for your area by logging in to https://customer.xfinity.com/Secure/MyServices/ or by checking the voice response system at 1-800-Comcast.
    If no outage is reported, see Connection Troubleshooting Tips. If you want to troubleshoot this yourself and still need help, please provide Information Requested for Connection-Related Posts.
    If you are using Wifi it's best to switch to an Ethernet connection if possible while measuring speed and checking the reliability of your connection to Comcast.
    If you'd rather have them do the troubleshooting call them at the phone number on your bill or 1-800-Comcast and have them send a tech out to identify the cause and correct it.
    If the tech finds bad coax, splitters, amplifiers, or connections in your home (even if Comcast originally supplied them) you'll probably have to pay for the visit unless you have their Service Protection Plan (http://www.xfinity.com/spp/, about $5/mo). If the trouble is due to a faulty Comcast modem, eMTA, gateway device, or anything outside your home, you shouldn't be charged.

Maybe you are looking for

  • Windows 8.1 installation problem

    i want to update my windows 8 to 8.1 but when i try to update it...its saying that ''setup couldn't start properly. Please reboot your PC and try running windows 8.1 setup again'' plz help me....:(

  • Error message when uploading completed form.

    I am getting an intermittent error when filling out and retrning a from via acrobat.com.  Somtines it works and the form data appears on the website but othertimes the user get a message that data collection is closed.  Once that happens the user wil

  • Fail to convert between UTF8 and UCS2: failUTF8Conv

    We need to store possibly all UTF8 chararacter in his database especially $ & ( 4 8 < = > from WE8ISO8859P1 and from WE8ISO8859P15. So we install an UTF8 instance and set NLS_LANG to UTF8. We have to do select/update from a java client and sqlplus(li

  • IOS 6 Livestreaming NOT Working, iOS5 and below works fine

    Using FMS 4.5 to stream to IPAD/IPHONE, it's been working OK, BUT NOT ON NEW iOs 6, Users who have upgraded to iOs 6 cannot access livestream? Any Suggesting? SOS Thanks

  • Lightroom Brushes are adding a Tint, even images converted to B&W

    I'm using Lightroom 4.4 on Mac. Having an issue where all brushes and graduated filters are adding a warm yellow tint, no matter what the color settings are for the brush. The tint persists, even if I convert the image to B&W within Lightroom.