一个命令行传递参数出现的问题,希望高人指教
import java.lang.*;
public class count
{
int year=2000;
static void countDays(int year)
{
for(int i=1;i<=11;i++)
{
switch(i)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:for(int j=1;j<=31;j++)
{
System.out.println(i+"月"+j+"日");
}
break;
case 4:
case 6:
case 9:
case 11:for(int k=1;k<=30;k++)
{
System.out.println(i+"月"+k+"日");
}
break;
case 2:if((year%4!=0)||((year%100==0)&(year%400!=0)))
{for(int m=1;m<=28;m++)
{
System.out.println(i+"月"+m+"日");
}
break;}
else
{for(int n=1;n<=29;n++)
{
System.out.println(i+"月"+n+"日");
}
break;}
}
}
}
public static void main(String[] args)
{
int x;
x=Integer.parseInt(args[0]);
count.countDays(x);
}
}
我这个程序。如果将main函数里面的X换成一个固定的数值就可以运行,但是我现在想从命令行接受参数,结果就出错:Exception in thread "main" java.lang.NoClassDefFoundError: