FileWriter problem with my toptenScores method!!!

Hey ya'll -- i'm STILLLLLL writing this dumb trivia program. I'm now having a problem with the FileWriter - that writes the final scores BACK to the toptenFile.
I'm hoping all these troubles are just growing pains of my first "big" program (big for me) - BUT I WORKED on this honker all night last night and into this afternoon and I am at my wits end!
I am posting the writing portion below hoping I am just missing something, but if you guys need the whole code let me know -- and below this code I will show the error I am getting as it trys to write to the file. ---
if (questionsMissed == 3 )
if (score > topScoresInt[0])
String name = JOptionPane.showInputDialog(null,
"GAME OVER. Your score is " + score + "\n Please enter you initials - no spaces", // Message to display
"You got a High Score!", JOptionPane.INFORMATION_MESSAGE);
try {
BufferedWriter bw=new BufferedWriter(new FileWriter(toptenFile)); String[] scorestoFile = new String[10];
scoreToFile[0] = (score + " " + name);
bw.write(scoreToFile[0] + "\n");
for (i=1; i<=9; i++)
bw.write(scoreToFile[i] + "\n");
bw.close();
System.exit(0);
} catch (IOException ex) {
ex.printStackTrace();
HERE IS THE ERROR WHEN IT TRIES TO WRITE TO THE FILE
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:126)
at TriviaGame$answerButtonHandler.actionPerformed(TriviaGame.java:299)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(BasicButtonListener.java:285)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

OK - that helped me!
I was making the string because I had to stringify the sorting class that I had made earlier -- BUT I FORGOT to stringify -- this is the code I had left out.
for (i=1; i<=9; i++)
scoreToFile = top{i}.toString();
bw.write(scoreToFile[i] + "\n");
NOW THAT SOLVED EVERYTHING BUT ONE MORE THING!!!!
IT now writes to the file just fine but I CANT get it to give me a new line -- it is writing everything on one line.... (see how I tried an line break above? -- didnt work) -- any help on getting a line break?
** BTW - I just found out and BEFORE you jump on this -- I HAD to change the Arrays above to {i} from the bracket i because it was making it ITALICS and not showing it -- so disregard the curly brace syntax issue above please.
Message was edited by:
tvance929

Similar Messages

  • TS3297 Why I can't download a free game I get a message that there's a problem with my payment method but not what it is this is a free app I tried support and got nowhere help

    Why can't I down load a free app  I get a message that there is a problem with my payment method but I gave all information correctly , I did recently change my card no because I lost my old one .i did change the no. On my account      HOPE YOU HAVE SOME SUGGESTIONS  I DON'T SEE WHY THEY HAVE TO CHECKMY PAYMENT METHOD FOR A FREE GAME

    Contact iTunes customer support.
    We're all users like yourself and as such have no access to your account.

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Problem with the renameTO method in the Linux environment

    Hi
    I got a problem with the renameTO method in the Linux environment. The file is not moving.
    This method is returning false. the same code executed successfully in Windows environment.
    Can anyone give some fix to this one or an alternate solution to move the files in both windows and Linux.
    boolean success;
    File root = new File(tempPath);
                   File f = new File(root, phyFileName);
                   File dest = new File(targetPath);
    success = f.renameTo(new File(dest, actualFileName));actualFileName = 400.doc
    dest = /home/jboss-4.0.3/axsscm_1.0/axsscmDocuments/xchange/fileup/fshare/PO/1786

    JITHENDRA wrote:
    Thanks for the prompt replyNo problem.
    >
    Can u solve the below doubt.
    Will renameTo method wont work in Linux? If so why?Did you not read what I said? I suspect you are trying to rename a file so that it actually has to be moved to a different volume (partition or hard disk) so it won't work. One would have the same problem on Windows trying to rename a file on the c: drive to a name on the d: drive.
    >
    >
    Can u give a sample or good link to do the above work which works fine in all environments.?Just follow the pseudo code I gave. 15 minutes work.

  • Problems with the dispatchEvent-Methode

    Hallo,
    I have a strange problem with above mentioned methode
    I have a JTextField, and I want that only numeric inputs are
    accepted, so I used a KeyListener -Interface in the following way
    public void keyTyped(KeyEvent e)
    JTextField field =(JTextField)e.getSource();
    char c =e.getKeyChar();
    if(c>57 | c<46 |c==47 &&c >31)
    field.dispatchEvent(e);
    the other methodes keyPressed and keyReleased are implemented in the same way.
    So if I type in now in my JTextField an 'a' or whatsoever
    then the following Exception occurs:
    java.lang.StackOverflowError
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1483)
    at java.awt.EventQueue.setCurrentEventAndMostRecentTime(EventQueue.java:731)
    at java.awt.Component.dispatchEventImpl(Component.java:3448)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    Mmh, and this is not the whole Exception message.
    There are missing a couple of lines.
    But may be one of you knows what my mistake is.
    Thanks advance.

    This is not the best way to validate for numerics. Check out the "Creating a Validated Text Field" section from the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation

  • Problem with a template method in JDialog

    Hi friends,
    I'm experiencing a problem with JDialog. I have a base abstract class ChooseLocationDialog<E> to let a client choose a location for database. This is an abstract class with two abstract methods:
    protected abstract E prepareLocation();
    protected abstract JPanel prepareForm();Method prepareForm is used in the constructor of ChooseLocationDialog to get a JPanel and add it to content pane.
    Method prepareLocation is used to prepare location of a database. I have to options - local file and networking.
    There are two subclasses ChooseRemoteLocationDialog and ChooseLocalFileDialog.
    When I start a local version, ChooseLocalFileDialog with one input field for local file, everything works fine and my local client version starts execution.
    The problem arises when I start a network version of my client. Dialog appears and I can enter host and port into the input fields. But when I click Select, I get NullPointerException. During debugging I noticed that the values I entered into these fields ("localhost" for host and "10999" for port) were not set for corresponding JTextFields and when my code executes getText() method for these input fields it returns empty strings. This happens only for one of these dialogs - for the ChooseRemoteLocationDialog.
    The code for ChooseLocationDialog class:
    public abstract class ChooseLocationDialog<E> extends JDialog {
         private E databaseLocation;
         private static final long serialVersionUID = -1630416811077468527L;
         public ChooseLocationDialog() {
              setTitle("Choose database location");
              setAlwaysOnTop(true);
              setModal(true);
              Container container = getContentPane();
              JPanel mainPanel = new JPanel();
              //retrieving a form of a concrete implementation
              JPanel formPanel = prepareForm();
              mainPanel.add(formPanel, BorderLayout.CENTER);
              JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
              JButton okButton = new JButton(new SelectLocationAction());
              JButton cancelButton = new JButton(new CancelSelectAction());
              buttonPanel.add(okButton);
              buttonPanel.add(cancelButton);
              mainPanel.add(buttonPanel, BorderLayout.SOUTH);
              container.add(mainPanel);
              pack();
              Toolkit toolkit = Toolkit.getDefaultToolkit();
              Dimension screenSize = toolkit.getScreenSize();
              int x = (screenSize.width - getWidth()) / 2;
              int y = (screenSize.height - getHeight()) / 2;
              setLocation(x, y);
              addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent e) {
                        super.windowClosing(e);
                        System.exit(0);
         public E getDatabaseLocation() {
                return databaseLocation;
         protected abstract E prepareLocation();
         protected abstract JPanel prepareForm();
          * Action for selecting location.
          * @author spyboost
         private class SelectLocationAction extends AbstractAction {
              private static final long serialVersionUID = 6242940810223013690L;
              public SelectLocationAction() {
                   putValue(Action.NAME, "Select");
              @Override
              public void actionPerformed(ActionEvent e) {
                   databaseLocation = prepareLocation();
                   setVisible(false);
         private class CancelSelectAction extends AbstractAction {
              private static final long serialVersionUID = -1025433106273231228L;
              public CancelSelectAction() {
                   putValue(Action.NAME, "Cancel");
              @Override
              public void actionPerformed(ActionEvent e) {
                   System.exit(0);
    }Code for ChooseLocalFileDialog
    public class ChooseLocalFileDialog extends ChooseLocationDialog<String> {
         private JTextField fileTextField;
         private static final long serialVersionUID = 2232230394481975840L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel();
              panel.add(new JLabel("File"));
              fileTextField = new JTextField(15);
              panel.add(fileTextField);
              return panel;
         @Override
         protected String prepareLocation() {
              String location = fileTextField.getText();
              return location;
    }Code for ChooseRemoteLocationDialog
    public class ChooseRemoteLocationDialog extends
              ChooseLocationDialog<RemoteLocation> {
         private JTextField hostField;
         private JTextField portField;
         private static final long serialVersionUID = -2282249521568378092L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel(new GridLayout(2, 2));
              panel.add(new JLabel("Host"));
              hostField = new JTextField(15);
              panel.add(hostField);
              panel.add(new JLabel("Port"));
              portField = new JTextField(15);
              panel.add(portField);
              return panel;
         @Override
         protected RemoteLocation prepareLocation() {
              String host = hostField.getText();
              int port = 0;
              try {
                   String portText = portField.getText();
                   port = Integer.getInteger(portText);
              } catch (NumberFormatException e) {
                   e.printStackTrace();
              RemoteLocation location = new RemoteLocation(host, port);
              return location;
    }Code for RemoteLocation:
    public class RemoteLocation {
         private String host;
         private int port;
         public RemoteLocation() {
              super();
         public RemoteLocation(String host, int port) {
              super();
              this.host = host;
              this.port = port;
         public String getHost() {
              return host;
         public void setHost(String host) {
              this.host = host;
         public int getPort() {
              return port;
         public void setPort(int port) {
              this.port = port;
    }Code snippet for dialog usage in local client implementation:
    final ChooseLocationDialog<String> dialog = new ChooseLocalFileDialog();
    dialog.setVisible(true);
    location = dialog.getDatabaseLocation();
    String filePath = location;Code snippet for dialog usage in network client implementation:
    final ChooseLocationDialog<RemoteLocation> dialog = new ChooseRemoteLocationDialog();
    dialog.setVisible(true);
    RemoteLocation location = dialog.getDatabaseLocation();Exception that I'm getting:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:42)
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:1)
         at suncertify.client.gui.dialog.ChooseLocationDialog$SelectLocationAction.actionPerformed(ChooseLocationDialog.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6134)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5899)
         at java.awt.Container.processEvent(Container.java:2023)
         at java.awt.Component.dispatchEventImpl(Component.java:4501)
         at java.awt.Container.dispatchEventImpl(Container.java:2081)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
         at java.awt.Container.dispatchEventImpl(Container.java:2067)
         at java.awt.Window.dispatchEventImpl(Window.java:2458)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)java version "1.6.0"
    OpenJDK Runtime Environment (build 1.6.0-b09)
    OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)
    OS: Ubuntu 8.04
    Appreciate any help.
    Thanks.
    Edited by: spyboost on Jul 24, 2008 5:38 PM

    What a silly error! I have to call Integer.parseInt instead of getInt. Integer.getInt tries to find a system property. A small misprint, but a huge amount of time to debug. I always use parseInt method and couldn't even notice that silly misprint. Sometimes it's useful to see the trees instead of whole forest :)
    It works perfectly. Sorry for disturbing.

  • Problem with calling onApplicationStart() method

    Hi all,
         I have a problem with calling application.cfc's methods from coldfusion template. The problem is like when i am calling "onapplicationstart" method inside a cfml template i getting the error shown below
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
    My code is like below.
    Application.cfc
    <cfcomponent hint="control application" output="false">
    <cfscript>
    this.name="startest";
    this.applicationtimeout = createtimespan(0,2,0,0);
    this.sessionmanagement = True;
    this.sessionTimeout = createtimespan(0,0,5,0);
    </cfscript>
    <cffunction name="onApplicationStart" returnType="boolean">
        <cfset application.myvar = "saurav">
    <cfset application.newvar ="saurav2">
        <cfreturn true>
    </cffunction>
    </cfcomponent>
    testpage.cfm
    <cfset variables.onApplicationStart()>
    I have tried to call the above method in different way also like
    1--- <cfset onApplicationStart()>
    i got error like this
    Variable ONAPPLICATIONSTART is undefined.
    2---<cfset Application.onApplicationStart()>
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity
    Please help me out.
    Thanks
    Saurav

    You can't just call methods in a CFC without a reference to that CFC. This includes methods in Application.cfc.
    What are you trying to do, exactly, anyway? You'd probably be better served by placing a call to onApplicationStart within onRequestStart in Application.cfc, if your goal is to refresh the application based on some condition:
    <cffunction name="onRequestStart">
         <cfif someCondition>
              <cfset onApplicationStart()>
         </cfif>
    </cffunction>
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Problem with a string method

    Hello, I am working on a program that converts Roman numerals to Arabic numbers and the opposite. I have the Arabic to Roman part down, yet Roman to Arabic part is causing troubles for me.
    I know that there are many solutions out there, yet I would like just solutions within my code that would fix the problem it has.
    Instead of the whole code, here's the method that changes Roman to Arabic.
         //method to convert Roman numerals to Arabic numbers
         public static int toArabic (String x)
              int arabica=0;
              char chars;
              for (int y=0; y<=(x.length()-1); y++)
                   chars=x.charAt(y);
                   switch (chars)
                        case 'C':
                             if( x.length() == 1)
                                  arabica+=100;
                                  y++;
                             else if (x.charAt(y+1)=='M')
                                  arabica+=900;
                                  y++;
                             else if (x.charAt(y+1)=='D')
                                  arabica+=400;
                                  y++;
                             else
                                  arabica+=100;
                             break;
                        case 'X':
                             if(x.length() == 1)
                                  arabica+=10;
                                  y++;
                             else if (x.charAt(y+1)=='C')
                                  arabica+=90;
                                  y++;
                             else if (x.charAt(y+1)=='L')
                                  arabica+=40;
                                  y++;
                             else
                                  arabica+=10;
                             break;
                        case 'I':
                             if(x.length() == 1)
                                  arabica+=1;
                                  y++;
                             else if (x.charAt(y+1)=='X')
                                  arabica+=9;
                                  y++;
                             else if (x.charAt(y+1)=='V')
                                  arabica+=4;
                                  y++;
                             else
                                  arabica++;
                             break;
                        case 'M':
                             arabica+=1000;
                             break;
                        case 'D':
                             arabica+=500;
                             break;
                        case 'L':
                             arabica+=50;
                             break;
                        case 'V':
                             arabica+=5;
                             break;
    There's a problem with this, however, is that whenever I put something in like XX, CC, XXX, or II, the program says
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 2
    at java.lang.String.charAt(String.java:687)
    at RomanNumerals.toArabic(RomanNumerals.java:172)
    at RomanNumerals.main(RomanNumerals.java:33)
    I think this problem is caused by the if-else and else-if statements in my method for cases C, X, and I, as this problem doesn't come up when I do similar things to cases without the if statements. Could you perhaps find out what is causing this problem? I've been working on it for days after finishing the rest and I can't figure it out.
    Thanks

    import java.io.*;
    public class RomanNumerals{
              public static void main (String [] args)
              DataInput keyboard=new DataInputStream (System.in);
              String input;
              try
                   //options
                   System.out.println("1. Roman numerals to Arabic numbers");
                   System.out.println("2. Arabic numbers to Roman numerals");
                   System.out.println("3. Exit");
                   System.out.print("Enter your option: ");
                   input=keyboard.readLine();
                   int choice=Integer.parseInt(input);
                   switch (choice)
                        //Roman numerals to Arabic numbers
                        case 1:
                             String romanInput, ro;
                             int answer1;
                             System.out.print("Enter a Roman numeral: ");
                             romanInput=keyboard.readLine();
                             ro=romanInput.toUpperCase();
                             answer1=toArabic(ro); //line 33 where the error occurs
                             System.out.println("The Arabic number is: "+answer1);
                             break;
                        //Arabic numbers to Roman numerals
                        case 2:
                             String arabicInput, answer;
                             System.out.print("Enter an Arabic number: ");
                             arabicInput=keyboard.readLine();
                             int arabic=Integer.parseInt(arabicInput);
                             answer=toRomans(arabic);
                             System.out.println("The Roman numeral is: "+answer);
                             break;
                        case 3:
                             break;
                        default:
                             System.out.println("Invalid option.");
              catch(IOException e)
                   System.out.println("Error");
                   //method to convert Arabic numbers to Roman numerals
         public static String toRomans (int N)
              String roman="";
              while (N>=1000)
                   roman+="M";
                   N-=1000;
              while (N>=900)
                   roman+="CM";
                   N-=900;
              while (N>=500)
                   roman+="D";
                   N-=500;
              while (N>=400)
                   roman+="CD";
                   N-=400;
              while (N>=100)
                   roman+="C";
                   N-=100;
              while (N>=90)
                   roman+="XC";
                   N-=90;
              while (N>=50)
                   roman+="L";
                   N-=50;
              while (N>=40)
                   roman+="XL";
                   N-=40;
              while (N>=10)
                   roman+="X";
                   N-=10;
              while (N>=9)
                   roman+="IX";
                   N-=9;
              while (N>=5)
                   roman+="V";
                   N-=5;
              while (N>=4)
                   roman+="IV";
                   N-=4;
              while (N>=1)
                   roman+="I";
                   N-=1;
              return(roman);
         //method to convert Roman numerals to Arabic numbers
         public static int toArabic (String x)
              int arabica=0;
              char chars;
              for (int y=0; y<=(x.length()-1); y++)
                   chars=x.charAt(y);
                   switch (chars)
                        case 'C':
                             if( x.length() == 1)
                                  arabica+=100;
                                  y++;
                             else if (x.charAt(y+1)=='M')
                                  arabica+=900;
                                  y++;
                             else if (x.charAt(y+1)=='D')
                                  arabica+=400;
                                  y++;
                             else
                                  arabica+=100;
                             break;
                        case 'X':
                             if(x.length() == 1)
                                  arabica+=10;
                                  y++;
                             else if (x.charAt(y+1)=='C')   //the line 172 where error occurs
                                  arabica+=90;
                                  y++;
                             else if (x.charAt(y+1)=='L')
                                  arabica+=40;
                                  y++;
                             else
                                  arabica+=10;
                             break;
                        case 'I':
                             if(x.length() == 1)
                                  arabica+=1;
                                  y++;
                             else if (x.charAt(y+1)=='X')
                                  arabica+=9;
                                  y++;
                             else if (x.charAt(y+1)=='V')
                                  arabica+=4;
                                  y++;
                             else
                                  arabica++;
                             break;
                        case 'M':
                             arabica+=1000;
                             break;
                        case 'D':
                             arabica+=500;
                             break;
                        case 'L':
                             arabica+=50;
                             break;
                        case 'V':
                             arabica+=5;
                             break;
              return(arabica);
         }When I put in XX as the input, this is what the error comes out as:
    Enter a Roman numeral: XX
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 2
        at java.lang.String.charAt(String.java:687)
        at RomanNumerals.toArabic(RomanNumerals.java:172)
        at RomanNumerals.main(RomanNumerals.java:33)

  • [SOLVED][GRUB]Install problem with the new method

    Hi,
    it is not my first install of Arch Linux but I have a problem with this new kind of installation method, especially with GRUB.
    Here is my hard drives configuration :
    /dev/sda1 -> SSD 120 GB ntfs (windows)
    /dev/sdb1 -> HD 1 TB ext4 (data)
    /dev/sdc :
    /dev/sdc1 -> ext2 /boot
    /dev/sdc2 -> swap
    /dev/sdc3 -> ext4 /
    /dev/sdc5 -> ext4 /home
    During the installation, I installed grub (with grub-install) in /dev/sdc. I assumed it was the correct drive to install it but apparently not, Windows starts automatically and I don't have the grub menu.
    Should I install my system again or is there a way to boot on the livecd and install it ?
    Should I :
    1) mount /dev/sdc3 in /mnt then /dev/sdc1 in /mnt/boot and finally /dev/sdc5 in /mnt/home
    2) pacstrap /mnt grub-bios
    3) arch-chroot
    4) grub-install
    Thank you.
    Last edited by hiveNzin0 (2012-09-12 06:15:15)

    DSpider wrote:
    If you set whatever drive "/dev/sdc" is (brand and model) to boot first in the BIOS, all you need to do is install a bootloader on Arch. You don't even need a separate boot partition. It will use the /boot folder on root partition. Then install os-prober (if you don't already have this installed) and re-generate the .cfg.
    https://wiki.archlinux.org/index.php/Be … bootloader
    The problem is that I cannot select another hard drive. The only one available for the boot order is the Samsung 830 series (/dev/sda with Windows).
    The other options are the CD drive and removable disk.
    I checked that this morning, maybe I was too tired. I will check again this evening.
    But if I am right and I cannot select my intel SSD (containing my arch setup) for the boot order, would the solution I described work ? I don't see why not but my knowledge are basic in Linux.
    Thank you again for your help.

  • Problem with cl_gui_frontend_services execute method

    Halo experts ,
    I am facing a peculiar problem with  cl_gui_frontend_services execute  .
    I am trying to open documents using the method execute of  cl_gui_frontend_services
    . But the problem is it is not opening file with space in its name .
    ie it is able to open 'for_example.pdf' but not 'for example.pdf'
    Any one has idea why it is happening?
    Regards
    Arshad

    HI Arshad...
    This does not seems to be a problem of GUI...
    bad parameter  exceptions is coming ...  mean you are passing an incorrect parameter ...mean incorrect file name ...or the filename you are passing does not exits in you my documents folder ...
    I have executed the same code  ... and it is perfectly working fine ... you have to pass the file name exactly ... that means  if
    you are passing L11527110.pdf then the file name should be L11527110.pdf...
    if you are passing the parameter as L 11527110.pdf (* with space )   then the file name has to be exactly same ...  other wise ...
    the application ACRORD32.EXE  opens  but gives as error ...
    please check the file name in my docs and passing parameter value ....
    I am giving my code which i did .....
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application ='ACRORD32.EXE'
    parameter = 'B CDWBDIC.pdf'
    default_directory = 'C:\Documents and Settings\Ritamadmin\My Documents\'
    maximized = 'X'
    operation = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    synchronous_failed = 8
    not_supported_by_gui = 9
    OTHERS = 10.

  • Problem with seting action method to a Hyperlink object

    Hi there,
    as the subject says, I have a problem wih setting the action method of a Hyperlink object. Here is how the program is organized:
    I have an external bean which generates an ArrayList of Hyperlink objects. In the backing bean of my web page I call a method from the above mentioned external bean to generate the list of hyperlink objects. After that in the page bean I insert the hyperlink objects in GridPanel component. So far everything works fine, but the action method of the Hyperlink objects is not called and I can't understant why.
    Here is how I add the objects to the GridPanel component:
    private void populateGridPanel()
            Hyperlink hyper;
            for(int i=0; i< checkboxList.size(); i++)
                    hyper = (Hyperlink) hyperlinkList.get(i);
                    vehicleGridPanel.getChildren().add(hyper);
        }All properties of the Hyperlink objects are set in the external bean not in the page bean, here is how:
    //action method executed when the hyperlink is clicked
    MethodBinding mb = (MethodBinding) FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{Page1.hyperlink_action}", null);
    veHyperlink.setAction(mb);The populateGridPanel() method is called in the init() method of the page bean, after the initialization of all other components.
    An interesting fact is that if I manually drag-n-drop a hyperlink object to my page and programatically set its action method with the code above everything works fine. But using the same code for the dynamically generated hyperlink objects inserted in the grid panel doesn't work.
    Any kind of help is highly appreciated.
    Thanks!
    Message was edited by:
    panayot

    I got this use case to work as follows:
    1. Drag a Grid Panel and set its columns property to 1.
    2. Drag a Message Group.
    3. Use the following code in Page1:
    public void prerender() {
    populateGridPanel();
    private void populateGridPanel() {
    if (gridPanel1.getChildren().size() > 0) {return;}
    for (int i = 0; i < 3; i++) {
    Hyperlink veHyperlink = new Hyperlink();
    //action method executed when the hyperlink is clicked
    MethodBinding mb = (MethodBinding) FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{Page1.hyperlink_action}", null);
    veHyperlink.setAction(mb);
    veHyperlink.setText("dynamic hyperlink " + i);
    veHyperlink.setId("dynamicHyperlink" + i);
    gridPanel1.getChildren().add(veHyperlink);
    public void hyperlink_action() {
    info("Yup it worked at: " + new java.util.Date());
    4. Fix imports, Run, and then click on the hyperlinks.

  • Problem with JSObject.getWindow() method - Please Help

    I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded.
    The Applet window is a PopUp window from one of my application's window. First time I start my application and load that Applet the button works fine. It calls the Javascript method and the Method closes the window using the window.close() method.
    But now if I open the applet window again and click on the button to close the windows, it hangs. I put in trace statements and saw that it hangs on JSObject.getWindow() window.
    I am using JDK Plugin 1.2.2, testing in IE 6.0 with no microsoft JVM.
    Please, if somebody could give me some clue about why this would happen, I will really appreciate that. I have been stuck into this problem for last three days.

    Hello,
    I have the same problem as you have had. I am using a Flash GUI to control a Java 1.4.2_04 applet via JavaScript. The Java applet appears on 50 html pages within a web-based training. It works fine on IE 6.0 and NS 7.1 when I view only one of the applet pages. But when I turn e.g. from the 10th to the 11th page, the browser crashes due to a fatal exeption in vbscript.dll (IE) or xpconnect.dll (NS). Sometimes I can view 50 or more pages without problems, but the browser crashes far too often. (When I use the applet's own GUI to control it, I can view it on as many pages as I want without any problems).
    5 times per second Flash calls a JavaScript function, which calls a Java function, which returns a value (indicating the state of the applet), which JavaScript uses to set a Flash variable. Java never calls a JavaScript function. On IE I used VB Script to enable Flash to JavaScript communication.
    Is liveconnect buggy? Have you found a solution of the problem?

  • Problem with user defined methods

    Hello,
    I have created a user-defined method using the constructer and a number of sub-methods. The toString method is supposed to return the maximum, minimum, average, and median for an input data set. This program compiles with no problem, but doesn't seem to calculate the statistics. The max, min, med, and mean are all 0. Any help would be appreciated. Thanks a lot.
    import java.util.*;
    public class SO{
    private String id;
    private int N;
    private double[] data;
    private double average;
    private double minimum;
    private double maximum;
    private double med;
         public SO(){
         public void readData(){
              Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
         public void setDataValue(int k, double v){
              data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
         public double getDataValue(int k){
              double get = data[k];
              return get;
         private double mean(){
              double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
         private double min(){
              minimum = data[0];
              return minimum;
         private double max(){
              maximum = data[N-1];
              return maximum;
         private double median(){
              if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
         public void displayData(){
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void sortData(){
              Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void analyzeData(){
              System.out.println(this);     
         public String toString(){
              return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
              v.readData();
              System.out.println("Display Data");
              v.displayData();
              System.out.println("Analyze Data");
              v.analyzeData();
              System.out.println("Set Data\n");
              v.setDataValue(0,98.75);
              v.displayData();
              System.out.println("Sort Data");
              v.sortData();
              System.out.println("Access Data\n");
              System.out.println("data[0] = " + v.getDataValue(0));
              System.out.println("\nDisplay v");
              System.out.println(v);
    }

    Sorry
    import java.util.*;
    public class SO{
       private String id;      
       private int N;          
       private double[] data;
       private double average;
       private double minimum;
       private double maximum;
       private double med;
         public SO(){
            public void readData(){
                 Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
            public void setDataValue(int k, double v){
                 data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
            public double getDataValue(int k){
                 double get = data[k];
              return get;
            private double mean(){
                 double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
            private double min(){
                 minimum = data[0];
              return minimum;
            private double max(){
                 maximum = data[N-1];
              return maximum;
            private double median(){
                 if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
            public void displayData(){
                 System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void sortData(){
                 Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void analyzeData(){
                 System.out.println(this);       
            public String toString(){
                 return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
                     v.readData();
                     System.out.println("Display Data");
                     v.displayData();
                     System.out.println("Analyze Data");
                     v.analyzeData();
                     System.out.println("Set Data\n");
                     v.setDataValue(0,98.75);
                     v.displayData();
                     System.out.println("Sort Data");
                     v.sortData();
                     System.out.println("Access Data\n");
                     System.out.println("data[0] = " + v.getDataValue(0));
                     System.out.println("\nDisplay v");
                     System.out.println(v);
    }

  • Problem with combobox.select method in 2007A

    Hi,
    When I'm trying to select the empty validvalue with a combo in SBO 2007 A, I've the error "Out of Range"
    myCombo.Select( 0, BoSearchKey.psk_Index);
    However I'm sure that the item 0 of my ValidValues is blank.
    I tried to do the same thing by value or description and it's the same problem.
    Can anyone help me ?
    Thanks
    (I'm using 2005 version of SAPboui/bobsCom.dll)

    Hi Julien,
    i tried it as
    oComboBox.ValidValues.Add("1", "Combo Value 1")
            oComboBox.ValidValues.Add("", "") - as you wrote
            oComboBox.ValidValues.Add("2", "Combo Value 2")
            oComboBox.ValidValues.Add("3", "Combo Value 3")
            oComboBox.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue)
            oComboBox.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
    and both select method work. Are you sure that you have added this blank value?
    Try to debug it as
            Dim q As Integer
            Dim s As String
            For q = 0 To oComboBox.ValidValues.Count - 1
                s = oComboBox.ValidValues.Item(q).Value
            Next
    maybe it helps you.
    Petr

  • Problems with c++ native methods

    hello to all ,
         I am building an client-server application in java , which uses java native methods written
    in c++ .In every client's request , the applcation updates a hashtable .The hashtable is kept as an
    Object member variable in a java class .So updating the hashtable is like this : the native method is
    called which accesses the Object member variable , updates the hashtable and sets the new Object
    member variable value.
         That's the way that it should work ,but i am experiencing some serious problems because the jvm
    keeps on crashing with UNEXCPECTED SIGNAL 11 .My distribution is Mandrake 9.0 ,and i use java
    j2sdk1.4.1_01
    Here some very naive questions i have to ask :
    1.Is it possible that the jvm crashes because the size of the hashtable is not fixed ?
    2.Can it be a system problem (like libgcc ) or else ?
         Any opinion on this would be very helpful
         Thanks in advance ,
              Sbile
    P.S. Here the log file being created after every crash
    Unexpected Signal : 11 occurred at PC=0x404657B6
    Function=is_forwarded__C7oopDesc+0x6
    Library=/usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    Dynamic libraries:
    08048000-0804e000 r-xp 00000000 03:06 463913 /usr/local/j2sdk1.4.1_01/bin/java
    0804e000-0804f000 rw-p 00005000 03:06 463913 /usr/local/j2sdk1.4.1_01/bin/java
    40000000-40011000 r-xp 00000000 03:06 278533 /lib/ld-2.2.5.so
    40011000-40012000 rw-p 00010000 03:06 278533 /lib/ld-2.2.5.so
    40013000-4001c000 r-xp 00000000 03:06 119905 /usr/local/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so
    4001c000-4001d000 rw-p 00008000 03:06 119905 /usr/local/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so
    4001e000-40021000 r--s 00000000 03:06 447528 /usr/local/j2sdk1.4.1_01/jre/lib/ext/dnsns.jar
    40021000-40022000 r--s 00000000 03:06 198504 /usr/lib/kaffe/lib/microsoft.jar
    40022000-4002f000 r-xp 00000000 03:06 573447 /lib/i686/libpthread-0.9.so
    4002f000-40036000 rw-p 0000d000 03:06 573447 /lib/i686/libpthread-0.9.so
    40036000-40038000 r-xp 00000000 03:06 278544 /lib/libdl-2.2.5.so
    40038000-40039000 rw-p 00001000 03:06 278544 /lib/libdl-2.2.5.so
    40039000-40150000 r-xp 00000000 03:06 573443 /lib/i686/libc-2.2.5.so
    40150000-40155000 rw-p 00117000 03:06 573443 /lib/i686/libc-2.2.5.so
    40159000-40471000 r-xp 00000000 03:06 119911 /usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    40471000-40625000 rw-p 00317000 03:06 119911 /usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    40635000-40646000 r-xp 00000000 03:06 278548 /lib/libnsl-2.2.5.so
    40646000-40647000 rw-p 00011000 03:06 278548 /lib/libnsl-2.2.5.so
    40649000-4066b000 r-xp 00000000 03:06 573445 /lib/i686/libm-2.2.5.so
    4066b000-4066c000 rw-p 00021000 03:06 573445 /lib/i686/libm-2.2.5.so
    4066c000-4067c000 r-xp 00000000 03:06 119915 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libverify.so
    4067c000-4067e000 rw-p 0000f000 03:06 119915 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libverify.so
    4067e000-4069f000 r-xp 00000000 03:06 119916 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libjava.so
    4069f000-406a1000 rw-p 00020000 03:06 119916 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libjava.so
    406a1000-406b6000 r-xp 00000000 03:06 119918 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libzip.so
    406b6000-406b8000 rw-p 00014000 03:06 119918 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libzip.so
    406b8000-41d86000 r--s 00000000 03:06 119961 /usr/local/j2sdk1.4.1_01/jre/lib/rt.jar
    41dc9000-41de0000 r--s 00000000 03:06 119941 /usr/local/j2sdk1.4.1_01/jre/lib/sunrsasign.jar
    41de0000-41e51000 r--s 00000000 03:06 119943 /usr/local/j2sdk1.4.1_01/jre/lib/jsse.jar
    41e51000-41e64000 r--s 00000000 03:06 119942 /usr/local/j2sdk1.4.1_01/jre/lib/jce.jar
    41e64000-42120000 r--s 00000000 03:06 119959 /usr/local/j2sdk1.4.1_01/jre/lib/charsets.jar
    441c8000-441ca000 r--s 00000000 03:06 198471 /usr/lib/kaffe/lib/comm.jar
    441ca000-441cc000 r--s 00000000 03:06 198505 /usr/lib/kaffe/lib/pjava.jar
    441cc000-441d0000 r--s 00000000 03:06 185441 /usr/local/j2sdk1.4.1_01/lib/servlet.jar
    4c3d3000-4c3fe000 r--p 00000000 03:06 212998 /usr/share/locale/ISO-8859-15/LC_CTYPE
    4c3fe000-4c40c000 r--s 00000000 03:06 447534 /usr/local/j2sdk1.4.1_01/jre/lib/ext/ldapsec.jar
    4c40d000-4c416000 r-xp 00000000 03:06 278554 /lib/libnss_files-2.2.5.so
    4c416000-4c417000 rw-p 00008000 03:06 278554 /lib/libnss_files-2.2.5.so
    4c61b000-4c638000 r--s 00000000 03:06 447527 /usr/local/j2sdk1.4.1_01/jre/lib/ext/sunjce_provider.jar
    4c638000-4c6d7000 r--s 00000000 03:06 447529 /usr/local/j2sdk1.4.1_01/jre/lib/ext/localedata.jar
    4c6d7000-4c6eb000 r--s 00000000 03:06 198506 /usr/lib/kaffe/lib/rmi.jar
    4c6eb000-4cb9e000 r--s 00000000 03:06 185437 /usr/local/j2sdk1.4.1_01/lib/tools.jar
    4cb9e000-4cc93000 r--s 00000000 03:06 198503 /usr/lib/kaffe/lib/kjc.jar
    4cc93000-4cd9e000 r--s 00000000 03:06 198507 /usr/lib/kaffe/lib/rt.jar
    4cd9e000-4cda6000 r--s 00000000 03:06 201714 /usr/lib/kaffe/lib/sax.jar
    4cda6000-4cf61000 r--s 00000000 03:06 201715 /usr/lib/kaffe/lib/xerces.jar
    4cf61000-4cf81000 r--s 00000000 03:06 201713 /usr/lib/kaffe/lib/jdom.jar
    4cf81000-4cf85000 r-xp 00000000 03:06 266660 /home/sbile/diplomatikh/build/src/lib/libBuildHashTable.so
    4cf85000-4cf86000 rw-p 00004000 03:06 266660 /home/sbile/diplomatikh/build/src/lib/libBuildHashTable.so
    4cf95000-4d03e000 r-xp 00000000 03:06 508019 /usr/lib/libstdc++.so.5.0.0
    4d03e000-4d054000 rw-p 000a8000 03:06 508019 /usr/lib/libstdc++.so.5.0.0
    4d059000-4d060000 r-xp 00000000 03:06 278604 /lib/libgcc_s-3.2.so.1
    4d060000-4d061000 rw-p 00007000 03:06 278604 /lib/libgcc_s-3.2.so.1
    4d0e2000-4d0f2000 r-xp 00000000 03:06 119921 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libnet.so
    4d0f2000-4d0f4000 rw-p 0000f000 03:06 119921 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libnet.so
    Local Time = Sat May 10 04:25:40 2003
    Elapsed Time = 7
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002E6
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode)
    # An error report file has been saved as hs_err_pid4063.log.
    # Please refer to the file for further information.

    The dreaded Signal 11 means you've overwritten some memory you're not supposed to.
    Check that all of your array indexes are in range, that you're not accessing memory that's been freed etc etc.
    Try placing print statements at strategic places in your native code to narrow down the problem

Maybe you are looking for

  • Kernel panic after Mac OS 10.6.4 Software Update?

    I was in the process of installing SimCity 4 Rush Hour on my 15" MacBook Pro Summer-2008. I have NEVER had any problems with MacBook. I was having issues installing Rush Hour, so I decided I needed to restart. But first I ran the software update that

  • DOMparser throws IOException when encounters Hungarian Characters

    Hoi! I wrote a piece of code that extracts some information from an XML document into a vector of Java classes, using the oracle.xml.parser.v2.DOMParser. And it worked. Or seemed to work... But when I put some articles in the XML file in Hungarian, t

  • Manage Dynamic Distribution Groups

    We currently have a Dynamic Group, "All Staff"; I have been asked to remove Contracors from this group and still allow an Exchange account. No Filters seem to offer this option. Does the Dynamic Group only include meembers in the Active Directory Gro

  • BEx and Roles

    I am able to see the roles from the BI Main menu and WAD.  However I cannot see the roles when I open up BEx.  Why is this?  I am working on 3.5.  Thanks

  • Want to log my keystrokes INCLUDING hot-keys/shortcuts...possible?

    I am working on a personal project, and want to log my keystokes (essentially a Keylogger.)  But the KICKER being that I want to not only see my keystrokes and character, but the MANY keyboard shortcuts I use daily on my Mac.  It's just for a persona