或者说你自己的类,
没有加入classpath
没有加入classpath
解决方案 »
- 关于用netbean加载java jar文件
- java连接数据库问题
- IE加载不了applet
- 谁知道用installshield或installanywhere怎么制作一个安装程序.要求安装了程序a接着安装程序b...
- 请问如何获取当前日期,包括年、月、日、星期等信息
- 为什么我的程序在执行时会自动退出呢
- JSplitPane嵌套怎么不好使??
- 字符串中有回车,怎么把它改为空格
- 用什么函数能将我变量里的内容复制到WINDOWS剪切板?
- 我使用corba将Java和C程序连接起来,由Java向C传递一个字符串,但是我发现我原来的0a被换成了0d 0a,那位给各解释。
- 我的电脑最近不知是中了病毒还是怎么了,jbuilder6与jbuilder7都无法安装
- rs.close抛出异常的问题!
加一句:
SimpleDateFormat EffectNum = new SimpleDateFormat();
试试。
//dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
dbDriver = "com.sybase.jdbc2.jdbc.SybDriver";
//dbURL = "jdbc:odbc:sybase12";
dbURL = "jdbc:sybase:Tds:10.1.22.104:5000/rtwrdb";
TO zhu_liping(zz):
我所有的class都放在D:\wwwroot\WEB-INF\classes\Legend\water下了源文件也都在该目录下,在该目录下编译不对吗?
不行! EffectNum是我同目录下的一个class:EffectNum.class
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {
^
DBDisplay.java:114: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {
^
DBDisplay.java:114: cannot resolve symbol
symbol : class ServletException
location: class Legend.water.DBDisplay
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {^
DBDisplay.java:334: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException {
^
DBDisplay.java:334: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException {
^
DBDisplay.java:334: cannot resolve symbol
symbol : class ServletException
location: class Legend.water.DBDisplay
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException { ^
DBDisplay.java:340: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException {
^
DBDisplay.java:340: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException {
^
DBDisplay.java:340: cannot resolve symbol
symbol : class ServletException
location: class Legend.water.DBDisplay
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException { ^
DBDisplay.java:346: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void DisplayDataFromSQL(String aSQLSelect, HttpServletRequest req, Ht
tpServletResponse resp) throws Exception {
^
DBDisplay.java:346: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void DisplayDataFromSQL(String aSQLSelect, HttpServletRequest req, Ht
tpServletResponse resp) throws Exception {
^
DBDisplay.java:389: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void DisplayData(String aDataObjectFile, HttpServletRequest req, Http
ServletResponse resp) throws Exception {
^
DBDisplay.java:389: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void DisplayData(String aDataObjectFile, HttpServletRequest req, Http
ServletResponse resp) throws Exception {
^
DBDisplay.java:436: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void DisplayDataFromTable(String aTID, String aBeginDate, String aEnd
Date, String STCDT[], HttpServletRequest req, HttpServletResponse resp, int mPag
e,float mOtherValue) throws IOException { ^
DBDisplay.java:436: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void DisplayDataFromTable(String aTID, String aBeginDate, String aEnd
Date, String STCDT[], HttpServletRequest req, HttpServletResponse resp, int mPag
e,float mOtherValue) throws IOException { ^
DBDisplay.java:936: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public static void DisplayText(String sHead,String sBody,String sBottom,Ht
tpServletRequest req, HttpServletResponse resp) throws IOException
^
DBDisplay.java:936: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public static void DisplayText(String sHead,String sBody,String sBottom,Ht
tpServletRequest req, HttpServletResponse resp) throws IOException ^
DBDisplay.java:975: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void DispApplet(String aTID, String aBeginDate, String aEndDate, Stri
ng STCDT[],HttpServletRequest req,HttpServletResponse resp,String HistYear) thro
ws SQLException,IOException { ^
DBDisplay.java:975: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void DispApplet(String aTID, String aBeginDate, String aEndDate, Stri
ng STCDT[],HttpServletRequest req,HttpServletResponse resp,String HistYear) thro
ws SQLException,IOException { ^
DBDisplay.java:1136: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.DBDisplay
public void DisplayStat(String TID,String STCDT[],String BeginDate,String EndD
ate,HttpServletRequest req, HttpServletResponse res) throws IOException ^
DBDisplay.java:1136: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.DBDisplay
public void DisplayStat(String TID,String STCDT[],String BeginDate,String EndD
ate,HttpServletRequest req, HttpServletResponse res) throws IOException ^
DBDisplay.java:49: cannot resolve symbol
symbol : variable super
location: class Legend.water.DBDisplay
super.init(config);
^
t.http does not exist
import javax.servlet.http.*;
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:6: package javax.servle
t does not exist
import javax.servlet.*;
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:16: cannot resolve symb
ol
symbol : class HttpServlet
location: class Legend.water.GetDispData
public class GetDispData extends HttpServlet {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:34: cannot resolve symb
ol
symbol : class ServletConfig
location: class Legend.water.GetDispData
public void init(ServletConfig config) throws ServletException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:34: cannot resolve symb
ol
symbol : class ServletException
location: class Legend.water.GetDispData
public void init(ServletConfig config) throws ServletException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:98: cannot resolve symb
ol
symbol : class HttpServletRequest
location: class Legend.water.GetDispData
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:98: cannot resolve symb
ol
symbol : class HttpServletResponse
location: class Legend.water.GetDispData
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:98: cannot resolve symb
ol
symbol : class ServletException
location: class Legend.water.GetDispData
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException,IOException {^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:166: cannot resolve sym
bol
symbol : class HttpServletRequest
location: class Legend.water.GetDispData
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:166: cannot resolve sym
bol
symbol : class HttpServletResponse
location: class Legend.water.GetDispData
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:166: cannot resolve sym
bol
symbol : class ServletException
location: class Legend.water.GetDispData
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throw
s ServletException,java.io.IOException { ^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:173: cannot resolve sym
bol
symbol : class HttpServletRequest
location: class Legend.water.GetDispData
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:173: cannot resolve sym
bol
symbol : class HttpServletResponse
location: class Legend.water.GetDispData
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException {
^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:173: cannot resolve sym
bol
symbol : class ServletException
location: class Legend.water.GetDispData
protected void doPost(HttpServletRequest req, HttpServletResponse resp) thro
ws ServletException,java.io.IOException { ^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:183: cannot resolve sym
bol
symbol : class HttpServletResponse
location: class Legend.water.GetDispData
public void sendDataList(HttpServletResponse response,Object avector) {
^
D:\wwwroot\WEB-INF\classes\Legend\water\MaxStat.java:9: package javax.servlet.ht
tp does not exist
import javax.servlet.http.HttpServletRequest;
^
D:\wwwroot\WEB-INF\classes\Legend\water\MaxStat.java:10: package javax.servlet.h
ttp does not exist
import javax.servlet.http.HttpServletResponse;
^
D:\wwwroot\WEB-INF\classes\Legend\water\MaxStat.java:698: cannot resolve symbol
symbol : class HttpServletRequest
location: class Legend.water.MaxStat
public int PrintOverStat(String aSTCDT,String aBeginDate,String aEndDate,HttpS
ervletRequest req, HttpServletResponse resp) throws SQLException,IOException
^
D:\wwwroot\WEB-INF\classes\Legend\water\MaxStat.java:698: cannot resolve symbol
symbol : class HttpServletResponse
location: class Legend.water.MaxStat
public int PrintOverStat(String aSTCDT,String aBeginDate,String aEndDate,HttpS
ervletRequest req, HttpServletResponse resp) throws SQLException,IOException ^
D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java:40: cannot resolve symb
ol
symbol : variable super
location: class Legend.water.GetDispData
super.init(config);
^
D:\wwwroot\WEB-INF\classes\Legend\water\OverStat.java:9: package javax.servlet.h
ttp does not exist
import javax.servlet.http.HttpServletRequest;
^
D:\wwwroot\WEB-INF\classes\Legend\water\OverStat.java:10: package javax.servlet.
http does not exist
import javax.servlet.http.HttpServletResponse;
^
D:\wwwroot\WEB-INF\classes\Legend\water\OverStat.java:323: cannot resolve symbolsymbol : class HttpServletRequest
location: class Legend.water.OverStat
public int PrintOverStat(String aSTCDT,String aBeginDate,String aEndDate,HttpS
ervletRequest req, HttpServletResponse resp) throws SQLException,IOException
^
D:\wwwroot\WEB-INF\classes\Legend\water\OverStat.java:323: cannot resolve symbolsymbol : class HttpServletResponse
location: class Legend.water.OverStat
public int PrintOverStat(String aSTCDT,String aBeginDate,String aEndDate,HttpS
ervletRequest req, HttpServletResponse resp) throws SQLException,IOException ^
Note: D:\wwwroot\WEB-INF\classes\Legend\water\GetDispData.java uses or overrides
a deprecated API.
Note: Recompile with -deprecation for details.
57 errors
>_<我看不懂,Java我才入门呀!
加入到你的classpath。
其中的d:\program files\jdk换成你的安装路径。
1 首先到http://java.sun.com/products/servlet/2.2/ 去下载一个servlet.jar 回来。
2 把他放到jdk 的 lib 目录下。
3 在win2000 的环境设定理 把classpath 进行修改。
.;c:\jdk1.3.1\lib\tols.jar;c:\jdk1.3.1\lib\dt.jar;c:\test.;c:\jdk1.3.1\lib\servlet.jar;这样就ok了
还有qxjavajava兄classpath中的c:\test.;是什么路径呀,其它的我都加进去了
我的JDK是J2SDK1.4。
试试?
请forjie说说为什么要这样写呢?谢谢!!
我再晚些时候就要结帐了,请各位仁兄如愿意请留下E_mail或QQ号好吗?可以方便我们交流。( 主要方便我可以麻烦大家:-P )