Home > Back-end >  The Java compiler Could not find the or load the main class
The Java compiler Could not find the or load the main class

Time:10-31

Hello, you can help me have a look at the following code? I want to practice on the Internet looking for, but the IDEA of an error can't find the class, but I have the check what time the

1. Java file name is HelloUDF
2. The Classpath is Java path had been added
3. Are there under the SRC Java files, are also the class files generated within target



Package com. The test;

Import org, apache hadoop. Hive. Ql. Exec. UDF;
Import org, apache hadoop. IO. Text;

Public class HelloUDF extends UDF {
Public Text the evaluate (Text input) {
Return new Text (" Hello "+ input);
}

Public static void main (String [] args) {
HelloUDF udf=new HelloUDF ();
The Text result=udf. Evaluate (new Text (" bag "));

System. The out. Println (result. The toString ());
}
}

CodePudding user response:

Bless me, what a great god can give me the answer tomorrow
  • Related