我在运行自己编写的程序时,出现如下错误,将程序修改后,错误依旧如此,由于我的java不太好,看不大懂请各位帮我剖析一下这是为啥,谢谢
Exception in thread "main" java.lang.ClassNotFoundException: CDvelopment
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
我的main函数为:
public static void main(String[] args) {
try{
Configuration conf = new Configuration();
String[] otherArgs = new GenericOptionsParser(conf,args).getRemainingArgs();
if (otherArgs.length != 2) {
System.err.println("Usage: CDevelopment [i] ");
System.exit(2);
}
Job job = new Job(conf, "crop");
job.setJarByClass(CDevelopment.class);
job.setMapperClass(CDevelopmentMapper.class);
job.setNumReduceTasks(0);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(Text.class);
FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));
System.exit(job.waitForCompletion(true) ? 0 : 1);
} catch (IOException e) {
e.printStackTrace();
}catch(ClassNotFoundException e)
{
e.printStackTrace();
}catch(InterruptedException e)
{
e.printStackTrace();
}
}
毕业设计,很很急用,谢谢 |
|