Java help needed(PLEASE)

I have a Question for all you gifted people:
I am designing a sort of quiz which takes questions and three possible answers from a database(which also holds the real answer).It prints these on the dos screen and I then have a System.in statement which allows the user to enter his or her answer (eg A,B,C or 1,2,3). I need a way of adding up the score at the end!!I was thinking of storing there answers in an array and compairing there answer to my correct answer in the database and if it is the same add 1 and if it not the same add 0???
How would i write the System.in answers into an array and add them up???
These are my thoughts on how to do this i would love to hear yours!! And also a help with writing the code for the above system of scoreing would be GREATLY appriciated!!
thanks everyone,
james.

As mathuoa pointed out, since you already display the 3 possible answers to the user, get them into an array and display them on the screen. Then, as the user enters an answer, compare them with the three answers and if it is correct, update the score variable as such. If you want the history of answers that the user has given, then u will have to use a Vector/List/some such collection object to hold the user's answers.
java.util.Vector answers = new java.util.Vector();
answers.add(usersAnswer1);
answers.add(usersAnswer2);
Then, to get the entries,
for(Enumeration e = answers.elements(); e.hasMoreElements();)
System.out.println(e.nextElement());
//Do something with the answer.
This is one possible way of getting the answers from the user!

Similar Messages

  • Help needed please.. how do I remove my credit card from itunes? just discovered over $450 of charges when I looked at my email... Kids had no clue they were using our money and not their gift cards

    Help needed please.... I just discovered over $450 charges to my credit card from Itunes. The kids had no idea they were using our credit card and not their itunes gift cards and 4 year old just clicks on anything! I didnt save my credit card details so am a bit miffed at this... I cant find anywhere in itunes to remove it. Edit.. but not remove. Editing does not remove it.. HELP

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918

  • Help needed please, with Iphone stuck with apple picture and progress bar after software update attempted

    Help needed please, everytime I try to update the software version on my iphone it comes up with a message saying it could not be completed and is now frozen with the apple picture and progress bar on it. Do I unplug it and hope the macbook pro sees it again, I also stupidly did not back up before starting the download which I realise I will have to go back to the previous back up. This keeps happening, everytime I do this type of update, I'm starting to think I should just give up on updating my software on the Iphone. I thought it was happening because I was using a window based computer to do the updates, this time I used my Macbook Pro. Please somebody help

    ljm17 wrote:
    ...This keeps happening, everytime I do this type of update, I...
    Then you should know what you need to do... If you don't remember...
    See Here  >  http://support.apple.com/kb/HT1808

  • I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    Have you guys been able to activate your iphone yet? I bought an iphone 4s from eBay and it worked fine, but the previous user had left some data on it, so last night I used the "erased all content and settings" to restore it to factory setting so I can start fresh and restore my backup. But now I'm stuck at the activation screen (I get the same "the activation server is temporarily unavailable")  and can't get it to activate, even if I use my old deactivated AT&T sim card (I'm on straighttalk now).
    I might try activating it with an active AT&T sim card from my fiancee's phone when she gets home, so I'll let you know how that works outs.
    If it's true that the server is down; anyone know when it will be back up again? Thanks in advance.
    iPhone 4s iOS 5.1.1 (9B206)
    Carrier AT&T 12.0
    Modem Firmware 2.0.12

  • HELP NEEDED PLEASE

    Hi everyone
    Programming help needed here. Any advice would be greatly appreciated!!!
    I have been assigned some work for a program called Processing 1.0 availale at http://processing.org/download
    I was give the 9 individual programs I needed to make however they were converted to Java files from .pde files. The program is based on Java but only runs .pde files and NOTHING else!
    I decompiled the files and got the source code, but it is a slight variation of the original someone made in processing, and needs some tidying to get it to run.
    I think the programs are very simple for a programmer, although I AM NOT.
    CODE is BELOW
    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov Date: 02/05/2009 13:15:00
    // Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: Assign2_1.java
    import processing.core.PApplet;
    public class Assign2_1 extends PApplet
    public Assign2_1()
    SquareSide = 20;
    Rank = Nums.length;
    Side = SquareSide * Rank;
    Green = color(0, 255, 0);
    Yellow = color(255, 255, 0);
    BG = Yellow;
    public void setup()
    size(Side, Side);
    background(BG);
    fill(Green);
    for(int i = 0; i < Rank; i++)
    rect(i * SquareSide, 0.0F, SquareSide, SquareSide * Nums);
    public static void main(String args[])
    PApplet.main(new String[] {
    "--bgcolor=#ece9d8", "Assign2_1"
    int Nums[] = {
    6, 14, 8, 9, 2, 3, 4, 2, 8, 3,
    9, 2, 0, 5
    int SquareSide;
    int Rank;
    int Side;
    int Green;
    int Yellow;
    int BG;
    Edited by: chevy1 on May 2, 2009 7:32 AM

    HELP NEEDED PLEASEShouting is a good way ensure you don't get help. Also you should give a meaningful subject.
    Any advice would be greatly appreciated!!!I suggest you ask a question after providing enough information to be able to answer it.
    Also use CODE tags when posting code as it make the code more readable.
    We are more likely to help people who are trying to learn Java rather than someone who might be looking for an easy way out of doing an assignment.

  • New Hard drive, can't access certain aspects. Help needed please

    Hi everyone.
    I have an HP Pavilion dv6-6052ea laptop.
    I've been having problems with the hard drive so got a new one installed.
    My main issues are since getting it back, I can't access any of the original HP installations etc (I've downloaded all the drivers I know about through HP).
    The 2 main things I'm missing are 2 things that came with the laptop.
    1: Beats Audio sound system 
    2: Video Graphics: AMD Radeon HD 6490M (1 GB DDR5)
    and I have no idea how to get them back. Can anyone help. Do I need to install specific drivers? I can't find any trace that they exist on my laptop now apart from the stickers on the laptop! Any help is greatly appreciated. 
    I never had any CD back ups for the laptop. I do have the old HP back up etc saved on a USB but I don't know enough about the folders and files to know what I need to look for. (I still have the old hardrive.)
    Again, any help is massively appreciated. Thank you!
    Tony 

    If you used your HP Recovery Media, all factory install drivers and software would have been installed. If you didn't create your HP Recovery Media when you first setup your computer, please contact official HP support in your region / country, via the HP Worldwide Support Portal, to see if HP Recovery Media is available for your computer.
    If a generic Windows 7 installation disc was used, you will need to install all HP specific driver for your computer. Please try IDT High-Definition (HD) Audio Driver, Intel High-Definition (HD) Graphics Driver, and AMD High-Definition Graphics Driver to resolve your missing drivers issues. Windows 7 64-bit driver for your computer can be found on the HP Pavilion dv6-6052ea Entertainment Notebook PC Drivers page.
    If you have any further questions, please don't hesitate to ask.
    Please click the White KUDOS "Thumbs Up" to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • ITunes corrupt file message - urgent help needed please

    I have an iPod video 30GB, i downloded the latest iTunes & Quicktime version, and updated my iPod also to the latest update. When i connect my iPod and start downloading music from the library in iTunes, the iPod keeps on disconnecting and restarting by itself, and i get a message that the file iTunes.exe is corrupt. I tried Apple support and did all what they said by downloading the latest updates and versions, and also did the Chkdsk utility on Windows, but still it did not work, the iPod keep on restarting and i cannot download anything on it, i had it now for a week and did not use it at all because of this problem, can somebody with a technical background help me please, i use Windows XP.

    I have an iPod video 30GB, i downloded the latest iTunes & Quicktime version, and updated my iPod also to the latest update. When i connect my iPod and start downloading music from the library in iTunes, the iPod keeps on disconnecting and restarting by itself, and i get a message that the file iTunes.exe is corrupt. I tried Apple support and did all what they said by downloading the latest updates and versions, and also did the Chkdsk utility on Windows, but still it did not work, the iPod keep on restarting and i cannot download anything on it, i had it now for a week and did not use it at all because of this problem, can somebody with a technical background help me please, i use Windows XP.

  • MP3 burning help needed please

    Hi,
    I'm hoping someone can help me please.
    I'm wanting to burn a mp3 cd but with the songs in separate folders so that when i play them in my car i can flick between the albums instead of having to go through all the singles one after another.
    Does anyone know of a good mp3 burner that can do this, and where to get it from too.
    All and any help in this matter is greatly appreciated
    Cheers
    Paul

    You want them in separate Album folders?
    Put the songs into the playlist.
    Sort the playlist by Album then burn it as MP3* disc.
    This will put the songs into Album folders.
    Likewise, if you sort by Artist, songs will be put into Artist/Album/ folders.
    * Note that only MP3 files will be burned to the disc. If the files are not already MP3 format, they will be skipped.
    If you burn it as a DataCD, it wil work the same except it will copy the files regardless of format. I do this as my CD player will work with both AAC & MP3 formats.

  • WLC Logs!!! Quick Help needed please!

    Hello,
       My client want to check who owned a certain IP address on the WLC and from which AP he was associated. I looked at the system logs in the GUI but couldn't get beyond 6 hours. Is there a place I can download last day logs from CLI/GUI? Or Can I login via SSH and extract the logs via CLI?
    Please this is vital and I appreciate your help,
    Regards,

    Please note that the customer is using Pass-Through Web Authentication for the Guest WLAN.
    Thanks,

  • Basic java problem help needed please

    the problem is :
    to produce a program which will show membership rates for a golf club..
    membership yearly rate new member joining fee
    category
    full 650 3000
    associate 200
    ladies 350 2000
    under 18 175
    new members must pay a joining fee in addition to the yearly rate as shown
    full/ladies members also prepay 150
    write a program which will enter details of members,calculate and output the total amount each member should pay.
    output number of members in each category
    the total income for each category....
    i need this program to show each category individually...cant do it at all..been at it a week....must be me && and || signs...i think...plz can someone help me as im really stuck now...thank you so much..
    import java.util.Scanner;
    public class assignmentquestion3 {
    public static Scanner key=new Scanner(System.in);
    public static void main(String []args){
    int fullfee=800,newfullfee=3800,associatefee=200,newla diesfee= 2350,ladiesfee= 350,under18fee = 175;
    int selectcat=0;
    int reply = 0;
    int addmember=0;
    int currentfulltotalmem=0,newfulltotalmem=0,associatet otalmem=0,ladiestotalmem=0,under18totalmem=0;
    int assoctotalcash=0,ladiestotalcash=0,under18totalcas h=0;
    int fullprepay=150;
    int ladiesfull=2500;
    int completefull = 0;
    int ladiescurrent=500;
    int under18=175;
    //Main introduction screen for the user and selections available. do while loops only allowing numbers 1,2,3 or 4.
    do{
    do{
    System.out.printf("\n\t %90s","********************Membership Rates For The Golf Club********************");
    System.out.printf("\n\n %105s","This program will allow users to enter details of members as well as calculating and.");
    System.out.printf("\n%106s","outputing the total amount each member should pay. The program allows users to view the");
    System.out.printf("\n%106s","total number of members in each category and the total income for each category.");
    System.out.printf("\n\n\t %75s","Please select your membership category: ");
    System.out.printf("\n\n\t %68s","Please press '1' for FULL");
    System.out.printf("\n\n\t %68s","Please press '2' for ASSOCIATE");
    System.out.printf("\n\n\t %68s","Please press '3' for LADIES");
    System.out.printf("\n\n\t %68s","Please press '4' for UNDER 18");
    System.out.printf("\n\n\t %68s","Please enter 1,2,3 or 4: ");
    selectcat=key.nextInt();
    }while (selectcat>4 || selectcat<1);
    do{
    System.out.printf("\n\n\t %75s","Are you a Current Member (press 1) or a New Member (press 2): ");
    reply=key.nextInt();
    }while (reply<1 || reply>2);
    //if number '1' for 'FULL' category is selected by the user and reply is 'yes'(1) then new full member fee is shown to user
    if (selectcat==1 ||reply==1)
    System.out.printf("\n\n\t %68s","CURRENT FULL MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Current full membership fees yearly are "+fullfee+"");
    System.out.printf("\n\n\t %68s","Full members must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %72s","The total of this membership is: "+fullfee+"");
    currentfulltotalmem=currentfulltotalmem+1;
    System.out.printf("\n\n\t %72s","The total number of 'CURRENT FULL MEMBERSHIPS = "+currentfulltotalmem+"");
    completefull=completefull+fullfee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
    //if number '1' is selected by the user and reply is 'no' (2) then full member fee is shown to user
    else if (selectcat==1 &&reply==2)
    System.out.printf("\n\n\t %68s","NEW FULL MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Full membership fees yearly are "+newfullfee+"");
    newfulltotalmem=newfulltotalmem+1;
    System.out.printf("\n\n\t %68s","The total number of 'NEW FULL MEMBERSHIPS = "+newfulltotalmem+"");
    completefull=completefull+newfullfee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
    //if number '2' is selected by the user then associate member fee is shown to user
    if (selectcat==2 &&(reply==1 || reply==2))
    System.out.printf("\n\n\t %75s","ASSOCIATE MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %75s","ASSOCIATE membership fees yearly are "+associatefee+"");
    associatetotalmem=associatetotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'ASSOCIATE MEMBERSHIPS' WITHIN THE CLUB = "+associatetotalmem+"");
    assoctotalcash=assoctotalcash+associatefee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'ASSOCIATE MEMBERSHIPS' within the club = "+assoctotalcash+"");
    //if number '3' is selected by the user and reply is 'yes' then new ladies member fee is shown to user
    if (selectcat==3 &&reply==1)
    System.out.printf("\n\n\t %68s","LADIES CURRENT MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Ladies full membership fees yearly are "+ladiesfee+"");
    System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiescurrent+"");
    ladiestotalmem=ladiestotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' WITHIN THE CLUB = "+ladiestotalmem+"");
    ladiestotalcash=ladiestotalcash+ladiescurrent;
    System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
    //if number '3' is selected by the user and reply is 'no' then the current ladies member fee is shown to user
    else
    if (selectcat==3 && reply==2)
    System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP fees yearly are "+newladiesfee+"");
    System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiesfull+"");
    ladiestotalmem=ladiestotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' within the club = "+ladiestotalmem+"");
    ladiestotalcash=ladiestotalcash+ladiesfull;
    System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
    //if number '4' is selected by the user then under 18 member fee is shown to user
    else if (selectcat==4 &&(reply==1||reply==2))
    System.out.printf("\n\n\t %75s","UNDER 18 MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %75s","UNDER 18 yearly membership fees are "+under18fee+"");}
    System.out.printf("\n\n\t %68s","The total of this membership is: "+under18+"");
    under18totalmem=under18totalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalmem+"");
    under18totalcash=under18totalcash+under18;
    System.out.printf("\n\n\t %68s","The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalcash+"");
    //allowing user to select '0' to add another member or any other key to exit program
    System.out.printf("\n\n\t %68s","Please Press '0' to add another member or any other key to exit.: ");
    addmember=key.nextInt();
    }while (addmember==0 ||addmember>1);}}
    the problem im having is whenever i make the choices 1,2,3,4 (CATEgorys) AND hit 1 or 2(current or new member selections) it brings up more than one category...
    for example when i hit 1(Category full) and 1(current member)..it displays this:
    Are you a Current Member (press 1) or a New Member (press 2): 1
    CURRENT FULL MEMBERSHIP SELECTED
    Current full membership fees yearly are 800
    Full members must also pre-pay 150 on a card can be used in the club facilities such as bar and shop
    The total of this membership is: 800
    The total number of 'CURRENT FULL MEMBERSHIPS = 1
    The total amount of income for 'FULL MEMBERSHIPS' within the club = 800
    The total of this membership is: 175
    The total number of 'UNDER 18 MEMBERSHIPS' within the club = 1
    The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = 175
    Please Press '0' to add another member or any other key to exit.:
    under 18 membership as well?...does this for other selections too...is it my arithmetic operators?....my if loops?...

    Multi-post [http://forums.sun.com/thread.jspa?threadID=5346248&messageID=10498270#10498270]
    And it still doesn't compile.

  • Importing XML into Java.  Help needed Please!!!

    Hi,
    I have downloaded j2sdk1.4.1_05 and want to configure it to import XML files into a DOM in Java. I am having trouble doing this and need help. I read that version 1.4 support JAXP 1.1 but I am having trouble finding the JAXP-api.jar file. It says to put all the other Jar files into a folder and leave the JAXP-api.jar.
    Could you please tell me how to set up Java so that I can import an XML file. I also downloaded JAXP 1.2. But there seems to be no installer.
    Thanx John

    You can learn about reading xml in java by reading the J2EE tutorial at
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    Here is sample program to read XML file into a DOM taken from this tutorial
    (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html)
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import java.io.*;
    public class TransformationApp
      static Document document;
      public static void main(String argv[])
        if (argv.length != 1) {
          System.err.println (
            "Usage: java TransformationApp filename");
          System.exit (1);
        DocumentBuilderFactory factory =
          DocumentBuilderFactory.newInstance();
        //factory.setNamespaceAware(true);
        //factory.setValidating(true);
        try {
          File f = new File(argv[0]);
          DocumentBuilder builder =
            factory.newDocumentBuilder();
          document = builder.parse(f);
        } catch (SAXParseException spe) {
          // Error generated by the parser
          System.out.println("\n** Parsing error"
            + ", line " + spe.getLineNumber()
            + ", uri " + spe.getSystemId());
          System.out.println("  " + spe.getMessage() );
          // Use the contained exception, if any
          Exception x = spe;
          if (spe.getException() != null)
            x = spe.getException();
          x.printStackTrace();
        } catch (SAXException sxe) {
          // Error generated by this application
          // (or a parser-initialization error)
          Exception x = sxe;
          if (sxe.getException() != null)
            x = sxe.getException();
          x.printStackTrace();
        } catch (ParserConfigurationException pce) {
          // Parser with specified options can't be built
          pce.printStackTrace();
        } catch (IOException ioe) {
          // I/O error
          ioe.printStackTrace();
      } // main
    } If you have java 1.4 sdk installed everything should compile and run. Separate
    JAXP package is nor required - JAXP is included in rt.jar in java-home-directory/jre/lib.

  • Java Server Chat, Help Needed PLEASE!! - NullPointerException

    Hi i am having problem with my java chat. when i go to load it i get a NullPointerException i know what code is causeing the problem but im not quite sure what it does can u explain to me please. Ive been looking at this error trying to fix it for a few weeks now and its annoying. Thank you for any help. Here is the code that causes the NullPointerException
         public static final void j()
            try
                String as[] = {
                    "ar", "aq", "ao"
                Class class1;
                Object obj = (class1 = Class.forName((new StringBuilder()).append(com/diginet/oldchat/server/g.getPackage().getName()).append(".an").toString())).getMethod(as[0], new Class[0]);
                if(q)
                    obj = ((Method) (obj)).invoke(null, new Object[0]);
                    Class aclass[];
                    (aclass = new Class[1])[0] = java/lang/String;
                    Object aobj[];
                    (aobj = new Object[1])[0] = obj;
                    for(int i1 = 1; i1 < as.length; i1++)
                        Method method;
                        (method = class1.getMethod(as[i1], aclass)).invoke(null, aobj);
                    q = false;
                return;
            catch(Exception _ex)
                ChatServer.q_java_util_Vector_static_fld = new Vector();
            ChatServer.q_com_diginet_digichat_common_SerialInfo_static_fld = null;
        }If part of the program uses
    com.diginet.oldchat.server.g.j();wich will load the code above it always gives NullPointerException and then wont continue loading what is wrong? Please help me
    Oh and by the way this is my first post on this forum and i found it quite easy to use!
    Please please please help me thnk youuu

    Ok here is what u asked for. Oh and by the way im running this from CMD so wilse the Chat Server is loading i can do the Stack Trace just as its trying to do what it does after saying "Expires On:" (Wich after gives NullPointerException) once the errors come on the screen i cant get a stack trace anymore by useing {CTRL} + Break. but i still hope this can help u :)
    *2009-05-07 22:23:30*
    Full thread dump Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing):
    *"Low Memory Detector" daemon prio=6 tid=0x02a7e000 nid=0xbcc runnable [0x0000000*
    *0..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"CompilerThread0" daemon prio=10 tid=0x02a7b000 nid=0xd80 waiting on condition [*
    *0x00000000..0x02d2f9c0]*
    java.lang.Thread.State: RUNNABLE
    *"Attach Listener" daemon prio=10 tid=0x02a79800 nid=0x270 runnable [0x00000000..*
    *0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Signal Dispatcher" daemon prio=10 tid=0x02a78400 nid=0x224 waiting on condition*
    *[0x00000000..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Finalizer" daemon prio=8 tid=0x02a73400 nid=0xf60 in Object.wait() [0x02c3f000.*
    *.0x02c3fa94]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    *"Reference Handler" daemon prio=10 tid=0x02a6ec00 nid=0xe2c in Object.wait() [0x*
    *02bef000..0x02befb14]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80310> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
    - locked <0x22a80310> (a java.lang.ref.Reference$Lock)
    *"main" prio=6 tid=0x002b6400 nid=0x6b0 runnable [0x0090f000..0x0090fe54]*
    java.lang.Thread.State: RUNNABLE
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
    at java.net.InetAddress.getAddressFromNameService(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getByName(Unknown Source)
    at java.net.InetSocketAddress.<init>(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    - locked <0x229fac68> (a sun.net.www.http.HttpClient)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
    ce)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
    urce)
    - locked <0x229f4118> (a sun.net.www.protocol.http.HttpURLConnection)
    at java.net.URL.openStream(Unknown Source)
    at com.diginet.oldchat.server.an.w(Unknown Source)
    at com.diginet.oldchat.server.an.ar(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.diginet.oldchat.server.g.j(Unknown Source)
    at com.diginet.digichat.server.ChatServer.<init>(Unknown Source)
    at com.diginet.digichat.server.ChatServer.main(Unknown Source)
    *"VM Thread" prio=10 tid=0x02a6d000 nid=0xe38 runnable*
    *"VM Periodic Task Thread" prio=10 tid=0x02a82c00 nid=0xa8 waiting on condition*
    JNI global references: 814
    Heap
    def new generation   total 960K, used 505K [0x22990000, 0x22a90000, 0x22e70000)
    eden space 896K,  49% used [0x22990000, 0x229fe4a0, 0x22a70000)
    from space 64K, 100% used [0x22a80000, 0x22a90000, 0x22a90000)
    to   space 64K,   0% used [0x22a70000, 0x22a70000, 0x22a80000)
    tenured generation   total 4096K, used 139K [0x22e70000, 0x23270000, 0x26990000
    the space 4096K,   3% used [0x22e70000, 0x22e92f88, 0x22e93000, 0x23270000)
    compacting perm gen  total 12288K, used 466K [0x26990000, 0x27590000, 0x2a99000
    *0)*
    the space 12288K,   3% used [0x26990000, 0x26a04b00, 0x26a04c00, 0x27590000)
    ro space 8192K,  63% used [0x2a990000, 0x2aea8810, 0x2aea8a00, 0x2b190000)
    rw space 12288K,  53% used [0x2b190000, 0x2b7fd300, 0x2b7fd400, 0x2bd90000)
    Thanks again an hope this helps.

  • Urgent help needed please: Updating Kernel

    Hi gurus,
    I am new to BI and needs to upgrade the Kernel to revision 133 for loading basis patch 14. I downloaded the kernel and copied to the F:\usr\sap\BID\SYS\exe\uc\NTI386.
    After this I was unable to restart the services.
    Can someone please guide thru this process.
    Thanks and regards,
    Iqbal

    Hi All,
    I tried as was recommended but am still faced with an issue.
    here is the dev_disp log.
    trc file: "dev_disp", trc level: 1, release: "700"
    sysno      00
    sid        BIQ
    systemid   562 (PC with Windows NT)
    relno      7000
    patchlevel 0
    patchno    133
    intno      20050900
    make:      multithreaded, Unicode, 64 bit, optimized
    pid        5908
    Mon Mar 24 08:37:12 2008
    kernel runs with dp version 232000(ext=109000) (@(#) DPLIB-INT-VERSION-232000-UC)
    length of sys_adm_ext is 576 bytes
    SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 5908) [dpxxdisp.c   1239]
         shared lib "dw_xml.dll" version 133 successfully loaded
         shared lib "dw_xtc.dll" version 133 successfully loaded
         shared lib "dw_stl.dll" version 133 successfully loaded
         shared lib "dw_gui.dll" version 133 successfully loaded
         shared lib "dw_mdm.dll" version 133 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Mon Mar 24 08:37:17 2008
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  5371]
    MtxInit: 30000 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
    ERROR => ShmCreate: Key=37 Inv.Size: req.=67072, alloc.=0 [shmnt.c      615]
    ERROR => CrtOsSemAdm: Semaphore Admin. Table not created [semnt.c      1991]
    ERROR => SemInMgt: Create Global Admin.Table failed [semnt.c      513]
    ERROR => DpSysAdmExtCreate: SemInMgt [dpxxtool2.c  725]
    ERROR => DpIPCInit2: DpSysAdmExtCreate [dpxxtool2.c  369]
    DP_FATAL_ERROR => DpSapEnvInit: DpIPCInit2
    DISPATCHER EMERGENCY SHUTDOWN ***
    NiWait: sleep (5000ms) ...
    NiISelect: timeout 5000ms
    NiISelect: maximum fd=1
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Mar 24 08:37:22 2008
    NiISelect: TIMEOUT occured (5000ms)
    DpHalt: shutdown server >< (normal)
    DpJ2eeDisableRestart
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    DpShmPrfSwitch : State already set (OFF)
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    call semaphore clean-up function ...
    ***LOG Q0E=> DpSigGenHandler, Exception (c0000005) [dpnttool.c   432]
    C-STACK -
    SAP (R) - R/3(TM) Callstack, Version 1.0
    Copyright (C) SAP AG. All rights reserved.
    Application exception occurred:
    Exception : c0000005 (Access Violation)
    App       : disp+work.EXE (pid=5908)
    When      : 3/24/2008 8:37:22.798
    Threads   : 2
    Computer Name       : RK-VAL-BI
    User Name           : SAPServiceBIQ
    Number of Processors: 4
    Processor Type: EM64T Family 6 Model 15 Stepping 7
    Windows Version     : 5.2 Current Build: 3790
    State Dump for Thread Id 970
    --> (FAULT) Stack Back Trace <--
    FramePtr         ReturnAd         Param#1          Function Name
    0000000007d1f310 000000000041a395 0000000000000001 disp+work!DpVmcCheckDebugProxy [dpxxvmc.c (1211)]
    0000000007d1f400 000000000041d007 005f005000410001 disp+work!DpHalt [dpxxdisp.c (10016)]
    0000000007d1fc40 0000000000421a1b 0000000002671ab0 disp+work!DpFatalErr [dpxxdisp.c (17789)]
    0000000007d1fee0 000000000042d570 0000000000000000 disp+work!DpSapEnvInit [dpxxdisp.c (1388)]
    0000000007d1ff10 000000000040108d ffffffff00000002 disp+work!DpMain [dpxxdisp.c (1076)]
    0000000007d1ff40 00000000019c7dd1 0000000000000000 disp+work!nlsui_main [thxxanf.c (84)]
    0000000007d1ffa0 0000000077d5964c 0000000000000000 disp+work!wmainCRTStartup [crtexe.c (498)]
    0000000007d1ffd0 0000000000000000 00000000019c7c60 kernel32!BaseProcessStart
    State Dump for Thread Id b88
    --> Stack Back Trace <--
    FramePtr         ReturnAd         Param#1          Function Name
    000000000ef0fe40 0000000077d5f691 0000000007e6ac60 ntdll!NtFsControlFile
    000000000ef0feb0 00000000018ae00f 0000000000000000 kernel32!ConnectNamedPipe
    000000000ef0ff40 000007ff7fc411c4 0000000000000000 disp+work!SigIMsgFunc [signt.c (679)]
    000000000ef0ff70 0000000077d6b6da 0000000077d6b6a0 msvcrt!endthreadex
    000000000ef0ffa0 0000000000000000 0000000000000000 kernel32!BaseThreadStart
    call clean-up function ...
    SigICallExitRoutine: call exithandler (DpHalt)
    DpHalt: shutdown server >< (normal)
    DpJ2eeDisableRestart
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    DpShmPrfSwitch : State already set (OFF)
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    Can someone please help me with getting pass this error?
    Thanks and regards,
    Iqbal

  • *Basic* Java help needed...

    I feel like a complete novice for posting this kinda stuff, but i figured somebody would take 5 minutes and help me out. My final in my programming class depends on 2 programs, one of which is giving me some actual trouble.
    What I have to do is create a java applet that allows a user to input their weight, select a planet, and then have their weight converted to what their weight would be on the selected planet. However, if the ouput is higher than 60 pounds, I need a picture of the michelin man to appear and the theme from star wars to play. If it is below 60, A multicolored asterisk should be displayed with applause.
    I will post what code I have already made. Please note: ITS VERY VERY BASIC. I may have overcomplicated some things, and there is always more than one way to do something (in my experience). Also, I kinda just converted a temperature conversion applet, so there may be some extra stuff I don't need.
    Please help.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class tempsapp2 extends Applet implements ActionListener
    Label prompt1;
    TextField input1;
    Label prompt2;
    TextField input2;
    int number1, number2;
    int mercury, venus, earth, mars, jupiter, saturn, neptune, uranus, pluto, result;
    public void init()
    prompt1 = new Label ("Enter your weight:");
    add (prompt1);
    input1 = new TextField (10);
    add (input1);
    prompt2 = new Label ("Enter the Number of the Planet you would like to have your weight converted to:");
    add (prompt2);
    input2 = new TextField (10);
    add (input2);
    input2.addActionListener(this);
    add (input2);
    public void paint (Graphics g)
    number1 = Integer.parseInt(input1.getText());
    number2 = Integer.parseInt(input2.getText());
    mercury = (number1*3780)/1000;
    venus = (number1*9070)/1000;
    earth = (number1*10)/1000;
    mars = (number1*3770)/1000;
    saturn = (number1*9160)/1000;
    uranus = (number1*8890)/1000;
    neptune = (number1*1125)/1000;
    jupiter =  (number1*2364)/1000;
    pluto = (number1*670)/1000;
    if(number2==1)
    g.drawString("Your weight on Mercury would be "+mercury+" lbs",100,150);
    else if(number2==2)
    g.drawString("Your weight on Venus would be "+venus+" lbs",100,150);
    else if(number2==3)
    g.drawString("Your weight on Earth would be "+earth+" lbs",100,150);
    else if(number2==4)
    g.drawString("Your weight on Mars would be "+mars+" lbs",100,150);
    else if(number2==5)
    g.drawString("Your weight on Jupiter would be "+jupiter+" lbs",100,150);
    else if(number2==6)
    g.drawString("Your weight on Saturn would be "+saturn+" lbs",100,150);
    else if(number2==7)
    g.drawString("Your weight on Uranus would be "+uranus+" lbs",100,150);
    else if(number2==8)
    g.drawString("Your weight on Neptune would be "+neptune+" lbs",100,150);
    else if(number2==9)
    g.drawString("Your weight on Pluto would be "+pluto+" lbs",100,150);
    public void actionPerformed(ActionEvent evt)
      number1 = Integer.parseInt(input1.getText());
      number2 = Integer.parseInt(input2.getText());
      repaint();
    }

    I am guessing that you are wondering where to go from here. If so http://java.sun.com/products/plugin/1.5.0/demos/applets/Animator/Animator.java may prove helpful.
    Also I would recommend using arrays of planet names and weight multipliers. It could make your code a lot less cumbersome.

  • Urgent help needed, please help me

    Hi,
    I am developing a web site using Java Servlets. The site requires to send XML as POST to an HTTPS server and get the response.
    Development environment:
    Laptop running Windows XP with jdk1.3.1, j2sdkee1.3 and Tomcat 4.1.
    Since I need to use https request from the servlet, I am using the following code;
    URL url = new URL("https://www.somesite.com");
    HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
    To use the above code I downloaded the jsse1.0.3_03 package from the sun website and added the three jar files to the appropriate location. Also edited the java.security file.
    The program compiles and when deployed to the web server, it works great.
    Now the problem;
    I need to deploy the web site in a server that is connected to the internet. This server is running Windows 2000 Server. It has the same jdk1.3.1, j2sdkee1.3 and Tomcat 4.1. Also I added the three jar files from jsse1.0.3_03. I also updated the classpath in the environment variable accordingly.
    Everything is pretty much similar to the Laptop that I use to develop the site except that the OS is Windows 2000 Server.
    But when I deployed the class files to the web server and tested the site, the servlet gave the following error:
    "unknown protocol: https"
    What could be wrong? I really need to fix this issue as soon as possible and any input from you will be highly appreciated.
    Thanks in advance,
    Rajesh

    Hi,
    I used java class as beans and added to JSP page as follows (the code is not complete, I am just giving the parts that are relevant);
    login.java: Implementation of login to access the database      
    *through JDBC. Uses MySQL.                              
    Last Modified: 03.22.03                    
    package user;
    import java.sql.*;
    import java.util.*;
    public class login
         private static Statement statement;
         private static Connection database;
         private static String jdbcDriver = "org.gjt.mm.mysql.Driver";
         private static String source = "jdbc:mysql://127.0.0.1/user";
         private static String username = "user";
         private static String password = "passwordforuser";
         Constructor for initializing the connection to the database                              
         public login()
              try
                   Class.forName(jdbcDriver);
                   database = DriverManager.getConnection(source, username, password);
                   statement = database.createStatement();
              catch (Exception e)
                   System.out.println("Error (From loginDatabase Constructor): " + e.getMessage());
         Used to check the users      
         public String checkUser(String userName, String passwd) throws Exception
              try
                   ResultSet names = statement.executeQuery("SELECT username, passwd FROM users");
                   while (names.next())
                   return "success";
                   return "wronguser";
              catch (Exception e)
                   throw e;
    <!--*********************************************************************************
    login.jsp: Server page to process the login request. Uses login.class to     
    *add / login users.                                        
    Last Modified: 03.23.03                         
    **********************************************************************************-->
    <%@ page import="user.login" %>
    <jsp:useBean id="login" scope="page" class="user.login" />
    <jsp:setProperty name="login" property="*" />
    <html>
    <head>
    <title>Login</title>
    </head>
    <body bgcolor="#3366FF" link="#000000" vlink="#000000" alink="#000000">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <% //Login the user and display the status
    String loginResult = login.checkUser(request.getParameter("username"), request.getParameter("password"));
    if (loginResult.equalsIgnoreCase("success"))
    %>
              <h1 align="center">You are successfully logged to the Server!</h1>
    <%
    %>
    </tr>
    </table>
    </body>
    </html>
    Hope that helps...
    Good luck!
    Rajesh

Maybe you are looking for

  • Help me Identify my Model number of Satellite P500

    Hi To All,             Guys I have bought a new toshiba satellite laptop P500 Series. I am having hard time to identify it's complete model number. I have search the internet all over but still haven't found any luck in identifying it. Could anyone p

  • Mac Mini(Late 2014) - Tick Sound

    Hello Apple User's. I just purchased a new Mac Mini late 2014 a month back. I had no problems initially after setting up my mac for the first time. I'm Currently working with Apple as a Technical Support Advisor in level 1. I was doing R&D on my mac

  • File to multiple IDOC split without BPM

    Hi expert, I have a flat file to IDOC scenario. In flat file, I have thousands of rows. Each row need to create one IDOC. In IDOC, I have 3 segments(seg2 is the child of seg1, seg3 is the child of seg2). Each field in flat file will be mapped to the

  • Error message when opening Classic version of Finale

    I use Finale as my music typesetting program. I have some old scores made using Finale 3.0.3 in OS 9.2.2 which, because of their complicated layout and spacing, do not open satisfactorily in Finale 2004 (version for OS X). I have the old Finale 3.0.3

  • SQL install on Cluster

    Dear Team, we got a error while installing sql on cluster We just want to clarify that "where do we install sql,on clustered shared drive or local drive?" Our setup is like below. Having two nodes clustered on one IP, and two shared drives(Clustered