我的java文件如何编译呀
import org.apache.struts.action.*;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public class RegisterAction extends Action{
public ActionForward perform (ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletRequest res){
RegisterForm rf = (RegisterForm) form;
String username = rf.getUsername();
String password1 = rf.getPassword1();
String password2 = rf.getPassword2();
if (password1.equals(password2)){
try{
UserDirectory.getInstance().setUser(username,password1);
return mapping.findForward("success");
}catch(UserDirectoryException e){
return mapping.findForward("failure");
}
}
return mapping.findForward("failure");
}
}
大家好!!我不知道这个java文件怎么编译,需要什么工具亚??谢谢!!!