terminated, exit value error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #1

    terminated, exit value error

    When I run my project I get this error.

    <terminated, exit value: 0>C:\Program Files\EasyEclip se Desktop Java 1.2.1\jre\bin\j avaw.exe (Jun 12, 2007 7:50:41 AM)

    What is the cause of this.

    Do you need to see my code?

    nomad
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by nomad
    When I run my project I get this error.

    <terminated, exit value: 0>C:\Program Files\EasyEclip se Desktop Java 1.2.1\jre\bin\j avaw.exe (Jun 12, 2007 7:50:41 AM)

    What is the cause of this.

    Do you need to see my code?

    nomad
    here is my code for this project.

    Code:
     import java.util.*; 
    
    
    
    public class HolidaySked {
    
    BitSet sked;
    
    
    
    public HolidaySked() {
    
    sked = new BitSet(365);
    
    int[] holiday = { 1, 20, 43, 48, 53, 116, 132, 147, 166, 167,
    
    189, 245, 287, 316, 328, 360 };
    
    for (int i = 0; i < holiday.length; i++) {
    
    addHoliday(holiday[i]);
    
    }
    
    }
    
    
    
    public void addHoliday(int dayToAdd) {
    
    sked.set(dayToAdd); 
    
    }
    
    
    
    public boolean isHoliday(int dayToCheck) {
    
    boolean result = sked.get(dayToCheck);
    
    return result;
    
    }
    
    
    
    public static void main(String[] arguments) {
    
    HolidaySked cal = new HolidaySked();
    
    if (arguments.length > 0) {
    
    try {
    
    int whichDay = Integer.parseInt(arguments[0]);
    
    if (cal.isHoliday(whichDay)) {
    
    System.out.println("Day number " + whichDay +
    
    " is a holiday.");
    
    } else {
    
    System.out.println("Day number " + whichDay +
    
    " is not a holiday.");
    
    }
    
    } catch (NumberFormatException nfe) {
    
    System.out.println("Error: " + nfe.getMessage());
    
    }
    
    }
    
    }
    Code:
    } 
    
    [left][/left]

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Are you sure you're passing at least one argument to your main() method?

      kind regards,

      Jos

      Comment

      • nomad
        Recognized Expert Contributor
        • Mar 2007
        • 664

        #4
        Originally posted by JosAH
        Are you sure you're passing at least one argument to your main() method?

        kind regards,

        Jos
        never mind I got it....

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by nomad
          never mind I got it....
          So what was the problem then? Maybe others are interested in your solution.

          kind regards,

          Jos

          Comment

          Working...