JAVA错误,不懂得怎么回事。。。

来源:百度知道 编辑:UC知道 时间:2024/06/01 12:44:44
2007-10-12 8:24:19 org.apache.jasper.compiler.Compiler generateClass
严重: Javac exception
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)

2007-10-12 8:24:19 org.apache.jasper.compiler.Compiler generateClass
严重: Error compiling file: /E:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/planeOrder//org/apache/jsp\uploadImage_jsp.java [javac] Compiling 1 source file

E:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\planeOrder&#

String d1 = s1.format(new java.util.Date(System.currentTimeMillis()));

应该要的是这种效果吧

String d1 = s1.format(System.currentTimeMillis()); 这句错了,你应该这样写

String d1 = s1.format(System.currentTimeMillis()).toString();

String d1 = s1.format(System.currentTimeMillis())+"";

希望你能满意,有不清楚的 tencent://message/?uin=147854620(复制到IE运行)Q我吧...

楼上不要误人子弟。

应该是s1.format(Calendar.getInstance().getTime())

SimpleDateFormat 没有format(long)方法!
只有format(Date) 和format(Object)两个一个参数的方法
而且在format(Object)中的Object也只能是时间类型。

上面应该用:
String d1 = s1.format(new java.util.Date());

s1.format(new java.sql.Timestamp(System.currentTimeMillis()))