Error When Running ANY Program

Anytime I try to run ANY Java program, i get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Program Name
I am POSITIVE I have compiled the programs and the *.class file appears. Anyone have any idea whats going on?

Anytime I try to run ANY Java program, i get the
following error:
Exception in thread "main"
java.lang.NoClassDefFoundError: Program Name
I am POSITIVE I have compiled the programs and the
*.class file appears. Anyone have any idea whats going
on?I just ran across what appears to be the exact same problem. The solution was to clear the CLASSPATH variable in the registry first, by entering "set classpath=", then calling the program with "java <program name>". In your case:set classpath=
java InvoiceAppType both in the directory where InvoiceApp.class is located. If, for some reason, that doesn't work, try:set classpath=<path to library directory of Java installation>
set classpath=
java InvoiceAppAn example of the library directory of the Java installation would be "\Program Files\Java\j2re1.4.2_02\lib"
A more permanent solution would be to remove the CLASSPATH key from the registry (the one under the SYSTEM category). This should also cause any other Java program to run correctly. However, the above should take care of the problem in the short-term.
Here is the link to the thread, in case it might help you out further:
http://forum.java.sun.com/thread.jsp?forum=32&thread=467639&tstart=0&trange=15
Best of luck, and hope this helps.

Similar Messages

  • It has an error when run a program in background job

    Dear Expert,
    we have a program
    when run it in background,it has a error "Error during import of clipboard contents" but when run it normally(run in front workbench se38 or run the t-code),everything is ok.i've used typingJDBG in the command box to debuge the background job,there has no error.
    whould you like to tell me what had happen? thanks a lot!
    addition: the program used a function ALSM_EXCEL_TO_INTERNAL_TABLE
    Thanks & Regards,
    Kerry
    Edited by: Kerry Wang on Aug 24, 2009 2:12 PM
    Edited by: Kerry Wang on Aug 24, 2009 2:14 PM
    Edited by: Kerry Wang on Aug 24, 2009 2:14 PM

    Hi,
      You cannot use FMs to get data directly from the presentation server when program is executed in the backgroud.
    Check the thread : GUI_DOWNLOAD
    Regards,
    Himanshu

  • Getting an error when running my program but it compiles.

    Hey guys, I'm having a problem running the program. Everything compiles correctly, but then I get the error code linked below. Everything I think is correct here. Any ideas? I posted CinReader as well in case you wanted to try compiling and running it yourself.
    Thanks
    public class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    public class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    import java.io.*;
    import java.util.*;
    public class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i<errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;

    Ok, here's what I did using the JSE 8.1 IDE.
    1) I copied your code into a .java file named "TextShuffleGame".
    It generated about half a dozon errors.
    There are three classes in the program:
    TextShuffleLevel
    TextShuffleGame
    CinReader
    Each of these classes is declared "public" and I got the same error message on each one:
    "class ... is public, should be declared in a file name ... .java"
    so, I...
    2) tried changing them to "private".
    It then said: "modifier private not allowed here".
    so, I...
    3) deleted the modifiers for these three classes and left them as just class. No errors.
    The next two errors had to do with the two import statements:
    "import java.io.*;" and "import java.util.*;".
    It said: "'class' or 'identifier' expected" for both. So, I...
    4) moved them to the top of the source file.
    Didn't help at first. So, I...
    5) fiddle around with them a bit.
    I tried "java.io;" and "java.util;" and then "java.*;" by itself. Still got errors. So, I put them back as you had them and for some mysterious reason, my editor decided they were fine. oO
    This also corrected the last errors in the "CinReader" class. Here is the error-free code I now have in my "TextShuffleGame.java" file:
    import java.io.*;
    import java.util.*;
    class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages[i]);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i < errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;
    Hope that helps.

  • Runtime error when running sample program VS8, occi10

    Please, help!
    When running a sample program (VS2005 v8, oraocci10.lib, oraocci10.dll, both downloaded from the recommended Oracle site http://www.oracle.com/technology/tech/oci/occi/occidownloads.html for Oracle release 10.2.0.3.0 )
    I receive the following runtime error:
    R6034 An application has made an attempt to load the C runtime library incorrectly.
    When I build the program with VS 7 or VS 7.1 libraries, I receive env->CreateConnection error

    Hi,
    Can you just give more explanation on what you are trying to do, like conditions.
    Are doing first time init.
    Reg
    Pra

  • Error when running a program /RPM/FIN_PLAN_INT

    when executing the program "/RPM/FIN_PLAN_INT", I'm getting an error stating as "Category ID does not exist for item.Instantiate categories first"
    This error is hitting for only 4 Items in list of all 173 Item. Hence the Financial cost are not getting update for all the items when executing the program. The DB update failed.
    I checked the financial Category IDs and its maintained properly and working fine with other Items. Why this is happening for only the 4 items? Am I missing something in config?
    Please experts provide me some valuable suggesions.

    Hi;
    When you define and edit the mapping between the project management role function ID and the financial planning view, category, or group. You can also decide on whether the cost or revenue rate is to be considered for the financial information calculation.
    1. Execute report /RPM/PLAN_INT_PREP to create financial and capacity categories and groups for the bucket or the portfolio items based on the parameters mentioned in the selection screen.
    2. Execute report /RPM/FIN_PLAN_INT to perform the financial planning for a portfolio item for the different portfolio items based on the parameters mentioned in the selection screen.
    Prerequisite: For the portfolio item, you must have executed report /RPM/PLAN_INT_PREP before.
    3. Execute report /RPM/BUCKET_ROLLUP to roll up the financial data for the different categories and groups of the portfolio items to its higher-level buckets.
    Hope this help you.
    Best Regards.
    Mariano

  • Error when MAKE any programs :(

    I always get this error when install anykind of programs, even I have tried to use HomeBrew and no error to be noticed in $brew doctor
    Can anyone help me to solve this!!!!!!!!!!

    Have you tried reading the linked page? The one next to the big red READ THIS message?
    Here it is again in case you missed it somehow…
    https://github.com/mxcl/homebrew/wiki/Troubleshooting
    Have you installed the latest Xcode?

  • Error when running any kind of adobe based webdynpro application

    Hi,
    I dont get this error for other kinds of web dynpro application, but whenever I deploy an adobe based application, I get the following error on running it.
    My Portal is NW04S SP9.
    I have a very simple adobe application and atleast the initial page should come up.
    It is based on the following example in help.sap.com
    http://help.sap.com/saphelp_nw04s/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm
    The initial exception that caused the request to fail, was:
    <b>Error Summary</b>
    <i>While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).</i>
    <b>Root Cause</b>
      <b> <i>java.net.ConnectException: A remote host refused an attempted connect operation.
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
        at java.net.Socket.connect(Socket.java:482)
        ... 47 more</i></b>
    Detailed Exception:
    <i>com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException.<init>(PDFDocumentRuntimeException.java:25)
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:396)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:887)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:215)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException.<init>(PDFDocumentRuntimeException.java:25)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:98)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:121)
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:341)
         ... 29 more
    Caused by: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Service call exception; nested exception is:
         java.net.ConnectException: A remote host refused an attempted connect operation.
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:382)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.render(PDFObject.java:3710)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:139)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
         ... 32 more
    Caused by: java.rmi.RemoteException: Service call exception; nested exception is:
         java.net.ConnectException: A remote host refused an attempted connect operation.
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:89)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:99)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:359)
         ... 35 more
    Caused by: java.net.ConnectException: A remote host refused an attempted connect operation.
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
         at java.net.Socket.connect(Socket.java:482)
         at java.net.Socket.connect(Socket.java:432)
         at java.net.Socket.<init>(Socket.java:339)
         at java.net.Socket.<init>(Socket.java:150)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.initStreamsFromSocket(HTTPSocket.java:648)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.initializeStreams(HTTPSocket.java:470)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getOutputStream(HTTPSocket.java:427)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.HTTPTransport.getRequestStream(HTTPTransport.java:355)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.outputMessage(MimeHttpBinding.java:548)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1425)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:82)
         ... 37 more</i>
    Thanks,
    Harish P Subramanian
    Mobile : 9903306035

    Hi
    I believe that u have all the prerequisites ie
    NWDS with Adobe lifecycle designer
    Adobe installed
    Adobe document services configured in J2ee engine
    Apart from that check whether you have the context structure and its properties same as that given in the example
    I had faced a problem because of that...
    pdfsource should be binary
    and there should b a attribute for the value node
    Regards
    Krishna

  • Appcomp error when running design program

    Hi, I am trying to run an embroidery digitizing program in Windows XP (I have Boot Camp). Program is Design Shop v. 9. It appeared to install correctly, and I have since installed a newer version. The program uses a dongle and when the program is opened and you begin to use it it crashes and gives me this error message. C:\DOCUME~1\carol\locks~1\temp\c5ba_appcompat.txt
    Program runs successfully on pc.
    I know there are others using this program on a mac. I appreciate any help in making this my actual work machine and not just the most expensive itunes system around.

    Hi Carol and welcome to Discussions,
    googling for c5ba_appcompat.txt gave this link to a Spyware/Malware analysis website: http://www.spywarelib.com/remove--Trojan-Backdoor-bifrose-etv.html
    Could be one reason why it crashes.
    But it is also possible, that this .txt file contains viable informations why the program crashes (e.g. some sort of crash report).
    Might be a good idea to contact the manufacturer of DesignShop about this error.
    Regards
    Stefan

  • ReplaceAll() error when run the program

    Hi everyone, I am developing an application to replace one string by another string with the method replaceAll() or replaceFirst() on NWDS v2.0.14.
    I have changed the Java Build Path from jdk1.3 to j2sdk 1.4.2_10 in order to make those two methods available.
    There is no problem in build and deployment. But when  execute this application I get an error telling there is no such method. When I comment out the line with the method in the code I can run this application without any error. I am sure the error is caused by the method.
    Can you tell me how to fix this problem? Should jdk of Java engine on server be upgraded?
    Any hint will be appreciated.
    Kind regards.
    Wang

    As you use NWDS 2.0.14 I guess you also run SP14 of your engine, so your engine should already run on top of JDK 1.4.
    You can add a line like this to your code to verify it:
    System.getProperty("java.version")
    Regards,
    Dieter

  • Error when running RFUMSV50 program (no output)

    Hi Experts ;
    The RFUMSV50 program does not generate transfer lines of deferred VAT ,
    The context is the following one:
    Code VAT Created with code target VAT, general account of VAT also created,
    Rule of deferred VAT created and activated for the company code in question, with marks to compensate for check.
    The data of tests are the following ones:
    Creation of an invoice via the FB60,
    Integral payment of the invoice via F-53,
    Creation of the confirmation of the operation in bank via the manual statement FF67,
    Clearing of the intermediate banking account  with the bank account  via F-03.
    After all these elements, by executing the RFUMSV50 program, I have nothing in result.
    There somebody who had the same problem, could help us?
    Thank you.
    Best regards

    Hi
    Service Tax credit cannot be utilized unless the Vendor Invoice is Paid. This is the reason till the payment is done the service tax Amount will be accumulated in deferred tax account and once the invoice is paid the balance in deferred tax is need to be transferred  to respective Service Tax , Educational Cess and higher Education Cess account. There can be various business scenarios for full and Partial Payment to facilitates the transfer of such deferred balance to respective account SAP has come up with some new standard program RFUMSV50 instead of RFUMSV25. To overcome the limitation of this program i.e. not able to take care of more than one tax line item, below the solution is provided with scenarios “Full Payment is made to Vendor Invoice”. 
    hope this is help ful
    thanks
    Trinath

  • I have compiled a program for a target after I added a new vi from NI_AALPro.lvlib. The addition worked fine on my development computer but gave me errors when run on the target.

    I have compiled a program for a target after I added a new vi from NI_AALPro.lvlib. The addition worked fine on my development computer but gave me errors when run on the target.
    The box displayed:
    Missing subVI NI_AALBase.lvlib:1D Linear Evaluation.vi in VI NI_PtbyPt.lvlib:Linear Fit PtbyPt.vi
    Missing subVI NI_AALPro.lvlib:MSE.vi in VI NIPtbtPt.lvlib:Linear Fit PtbyPt.vi
    What do I need to do to bring the correct library into the transportable code?

    Hello,
    I was unable to reproduce the behavior that you saw.  I was able to deploy my application with the Linear Fit PtByPt without issues.
    Could you attach the smallest piece of code that reproduces this behavior so that I can test it as well?
    Justin Parker
    National Instruments
    Product Support Engineer

  • Error when running allocation logic

    I am running the following allocation logic and get the following error:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<
    *DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<
    *ENDALLOCATION
    UJP_RULE_EXCEPTION:Missing [] on property name: WHAT=CE0004010. I get this error when executing the script using the program "UJK_SCRIPT_LOGIC_TESTER". I also get a similar error when running it via the data manager package.
    Any thoughts on why this error is happening?

    Hi Sanjay,
    I think you are using formula property for any of the dimension member used in the Allocation logic.
    FYI Allocation will not work fine for the dimension members which is calculated using the formula written in the formula Property.
    There is no problem with your script it looks fine.
    Hope this might help you.
    Regards,
    G.Vijaya Kumar

  • Error when Generating the Program

    Recently there was an SP upgrade and my Planning Book started giving me this error message (SCM version =5.0 and SP = 7)
    "Error when generating the program" Message no. /SAPAPO/TSM141
    Diagnosis: Generated programs are programs that are generated based on individual data objects, such as planning object structure, planning areas and Infocubes. These programs are then executed in the transaction. An error occured during the generation of such a program
    Possible causes:
    1. The template has been corrupted
    2. The object that the template uses to generate the program contains inconsistencies; for instance an Infocube has not been activated
    This error occurs when I try to open the my planning book/creating the selection profile. I've re-activated the Infocube and later deactivate and active my POS and tried to do the same for the Planning Area....but the error still persists. I tried to create a new planning area and tried it again but the error still persists. I've tried to fix any inconsistencies in the planning area time series objects by running the consistency check....however the same error pops up during the consistency check....
    Anyone encountered this error message and any possible solutions to this issue.
    Thanks
    Surender

    I did find an ABAP Dump when looking at ST22.  The short message is as follows:
    Runtime Errors         GEN_BRANCHOFFSET_LIMIT_REACHED
    Date and Time          05/14/2007 19:33:54
    Short text
         Jump distance is too large and cannot be generated.
    What happened?
         A jump distance is too large and cannot be generated.
         A control structure or a routine with "CHECK" or "EXIT" contains
         too many ABAP statements.
         Error in the ABAP Application Program
         The current ABAP program "GP_MET_PSTRU_BASIC_FORMS" had to be terminate
          because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         During the generation of program "GP_MET_PSTRU_BASIC_FORMS", the system
          determined that
         within an ABAP event a control structure (for example, IF..ENDIF
         or LOOP..ENDLOOP) or a routine (for example, FORM routine) has
         become too large. The resulting jump distance is too large so that
        it could no longer be generated.
        With the internal load format, the jump distance must not be
        greater than 32768 (this is the size of approximately 10.000
        ABAP statements).
        The jump distance that is to be generated, however, is 50885.
    How to correct the error
       The ABAP application program must be changed.

  • Error when running RSSB_GENERATE_AUTHORIZATIONS

    Iam having a SYSTEM_NO_TASK_STORAGE runtime Error when running program RSSB_GENERATE_AUTHORIZATIONS in a BW 3.5 system when it is attempting to load a very large amount of users/profiles from HR Structural Authorizations into BW.  The HR Structural Authorizations - Values 0PA_DS02 ODS was loaded with 47 million records when following the process specified on <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e1cba990-0201-0010-43ae-af579aee7a73">this SDN document.</a>
    Memory parameters have been continually adjusted to try to allow the process to run with no results. 
    Any help will be greatly appreciated.
    Thanks.

    Hi,
    Did you try and break up the loads into smaller chunks ?
    Else you can also try and increase the number of data packets by breaking up the data packets into smaller amount if data.
    Cheers,
    Kedar

  • Intermitten Errors when running reports in Crystal Report Viewer

    Hi All,
    We get intermittent errors when running the same crystal report over and over again.  Most of the time, it would run perfectly fine.  Once in a while we would see the error message below displayed...
    Failed to open the connection. Failed to open the connection. C:\DOCUME1\USBOAD1\LOCALS~1\Temp\{432E6564-2811-4364-84FB-5E315F8DCBCA}.rpt
    CrystalReportViewer - CrystalReportViewer1
    Error: Object reference not set to an instance of an object.
    We don't know how to reproduce this error.  We tried looking into the BusinessObjects log files and the error is trapped inside C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Logging\crystalras_2009420_3626_2716_ras.log with the message below:
    ErrorLog 2009  4 21 11:28:28.598 2716 10272 (\servers\ras\dtsagent\reporthandler.cpp:11592): CReportHandler::buildReportViewerError: CSResultException thrown.   ErrorSrc:"CRPE" FileName:"\servers\ras\dtsagent\reporthandler.cpp" LineNum:11588 ErrorCode:756 ErrorMsg:"Failed to open the connection.
    Failed to open the connection.
    C:\DOCUME1\USBOAD1.000\LOCALS~1\Temp\{432E6564-2811-4364-84FB-5E315F8DCBCA}.rpt" DetailedErrorMsg:"
    Question:
    Does anyone know why this is happening?  Any help will be much appreciated.  It happens maybe 1 out of 10 times the report runs.
    Versions:
    CR XI R2 SP1
    .Net Framework 2.0
    Windows 2000 SP4

    Hi,
    Give it a try by using the close and dispose method for report object and also use the GC.collect.
    Hope it helps!!
    Amit

Maybe you are looking for