Compile failed; see the compiler error output for details

 

出现 Compile failed; see the compiler error output for details错误,请大家帮忙解决!!!


public class CopyOfComplierToClass2 {
 
 public boolean sourceConvertClass() {
  boolean flag = false;
  File f = new File("d:/generator-output/hibernate/code/");

  // 找到所有的文件
  File[] files = f.listFiles();
  Javac compiler = new Javac();
  File destFile = null;
  for (File file : files) {
   // 找出不含.java文件
   if (file.getName().contains(".java")) {
    compiler.setProject(new Project());
    // 编译后的.class文件存放的路径
    destFile = new File("d:/generator-output/hibernate/code/");
    destFile.mkdirs();
    // 要编译的源文件目录
    Path srcPath = new Path(compiler.getProject(),
      "d:/generator-output/hibernate/code/");
    compiler.setFork(true);
    compiler.setSrcdir(srcPath);
    compiler.setDestdir(destFile);
    try {
     compiler.execute();
     flag = true;
    } catch (BuildException e) {

     //System.out.println("编译.class文件出现错误");
    }
   }

  }

  return flag;
 }

public static void main(String[] args) {

 

CopyOfComplierToClass2   cct = new CopyOfComplierToClass2 ();

 

System.out.println(cct.sourceConvertClass() );

 

}

 

}

 

 

阅读更多

Compile failed; see the compiler error output for details.

05-27

哪位侠客帮我看看,真的找不出办法了!,在JDK下编译也出这错,JDK版本已一样!rn2009-05-27 22:56:25,250 ERROR [org.apache.jasper.compiler.Compiler] Javac exception rnCompile failed; see the compiler error output for details.rn at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)rn at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)rn at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)rnrn2009-05-27 22:56:25,250 ERROR [org.apache.jasper.compiler.Compiler] Env: Compile: javaFileName=/E:/jboss-3.2.5/server/default/work/jboss.web/localhost/HSWeb//org/apache/jsp/contract/register\manage_005fview_jsp.javarn classpath=/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/classes/;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/axis-ant.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/axis.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/commons-discovery-0.2.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/commons-fileupload-1.0.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/commons-logging-1.0.4.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/IdGeneratorService.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/jaxrpc.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/jxl.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/log4j-1.2.8.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/log4j.properties;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/Moc_Common.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/mr.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/msbase.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/mssqlserver.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/msutil.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/ot-common.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/saaj.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/servlet.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/tools.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/wsdl4j-1.5.1.jar;E:\jboss-3.2.5\server\default\work\jboss.web\localhost\HSWeb;/E:/jboss-3.2.5/server/default/lib/snmp-support.jar;/E:/jboss-3.2.5/lib/dom4j.jar;/E:/jboss-3.2.5/server/default/tmp/deploy/tmp53041commons-logging.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/jaxrpc.jar;/E:/jboss-3.2.5/server/default/lib/scheduler-plugin-example.jar;/E:/jboss-3.2.5/server/default/tmp/deploy/tmp53037commons-beanutils.jar;/E:/jboss-3.2.5/server/default/lib/jboss-transaction.jar;/E:/jboss-3.2.5/server/default/lib/jboss-management.jar;/E:/jboss-3.2.5/server/default/tmp/deploy/tmp53045jasper-runtime.jar;/E:/jboss-3.2.5/server/default/tmp/deploy/tmp53049servlet-api.jar;/E:/jboss-3.2.5/server/default/deploy/HSWeb.war/WEB-INF/lib/axis-ant.jar;/E:/jboss-3.2.5/server/default/lib/autonumber-plugin.jar rn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\ot-common.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\saaj.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\servlet.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\tools.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\wsdl4j-1.5.1.jarrn cp=E:\jboss-3.2.5\server\default\work\jboss.web\localhost\HSWebrn cp=E:\jboss-3.2.5\server\default\lib\snmp-support.jarrn cp=E:\jboss-3.2.5\lib\dom4j.jarrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53041commons-logging.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\jaxrpc.jarrn cp=E:\jboss-3.2.5\server\default\lib\scheduler-plugin-example.jarrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53037commons-beanutils.jarrn cp=E:\jboss-3.2.5\server\default\lib\jboss-transaction.jarrn cp=E:\jboss-3.2.5\server\default\lib\jboss-management.jarrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53045jasper-runtime.jarrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53049servlet-api.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\axis-ant.jarrn cp=E:\jboss-3.2.5\server\default\lib\autonumber-plugin.jarrn cp=E:\jboss-3.2.5\server\default\lib\jcert.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\classesrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53038commons-collections.jarrn cp=E:\jboss-3.2.5\server\default\lib\properties-plugin.jarrn cp=E:\jboss-3.2.5\server\default\lib\jpl-pattern.jarrn cp=E:\jboss-3.2.5\server\default\deploy\http-invoker.sar\invoker.warrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\saaj.jarrn cp=E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\lib\ot-common.jarrn cp=E:\jboss-3.2.5\server\default\lib\jsse.jarrn cp=E:\jboss-3.2.5\server\default\tmp\deploy\tmp53063jms-ra.rarrn cp=E:\j2sdk1.4.2\jre\lib\ext\dnsns.jarrnrn2009-05-27 22:56:25,250 ERROR [org.apache.jasper.compiler.Compiler] Error compiling file: /E:/jboss-3.2.5/server/default/work/jboss.web/localhost/HSWeb//org/apache/jsp/contract/register\manage_005fview_jsp.java [javac] Compiling 1 source filernrnE:\jboss-3.2.5\server\default\work\jboss.web\localhost\HSWeb\org\apache\jsp\contract\register\manage_005fview_jsp.java:32: cannot access hs.oajk.SAPInf_DBrnbad class file: E:\jboss-3.2.5\server\default\deploy\HSWeb.war\WEB-INF\classes\hs\oajk\SAPInf_DB.classrnclass file has wrong version 49.0, should be 48.0rnPlease remove or make sure it appears in the correct subdirectory of the classpath.rnimport hs.oajk.SAPInf_DB;rn

相关热词
换一批

大家看看,这是什么错误:Compile failed; see the compiler error output for details.

07-18

JSP页面的内容如下:rnrn<%@ page contentType="text/html; charset=GBK" %>rn<%@ page import="com.labour.servlet.SysMayPurviewInfo"%>rnrn<%rn// java.util.ArrayList alSysMayMod = (ArrayList)session.getAttribute("Mod");//ModMayrn%>rnrnrn New Document rnrnrnrnrn<%=session.getAttribute("Mod").toString()%>rn rn rn toprn rnrnrnrn========================================rnrn我用的是TomCat,当编译JSP页面的时候出现如下错误:rnCompile failed; see the compiler error output for details.rn at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)rn at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)rn at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)rn at org.apache.jasper.JspCompilationContext.compile(JspCompilationContextrn.java:473)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapperrn.java:190)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2rn95)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVrnalve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVrnalve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:rn2415)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jrnava:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatchernrValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jrnava:172)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValrnve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22rn3)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.javarn:594)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.procernssConnection(Http11Protocol.java:392)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.javarn:565)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPrnool.java:619)rn at java.lang.Thread.run(Thread.java:536)

没有更多推荐了,返回首页