|
Java學习者论坛
原先,我的从sql中读shu据的java程序可以正常运行,当我重新配置了weblogic下的application时,再编译我的這个java程序(在命令窗的環境zhong),打出三个"cannot resolve symbol"的错误.我在classpath中已设置了类路徑:c:\myjava,放openSql类的dbbean包就在myjava中.并且数据源也配好了(同yuan来一样).各位高手,能帮我分析一下原因吗?谢谢!
cannot resolve symbol
symbol:class openSql
location:package dbbean
import dbbean.openSql;
cannot resolve symbol
symbol:class openSql
location:myjava.rdrzdtj1
openSql c=new openSql();
cannot resolve symbol
symbol:class openSql
location:class myjava.rdrzdtj1
openSql c=new openSql();
原程序:
package myjava;
import java.io.*;
import java.util.*;
import java.util.Date;
import java.text.*;
import dbbean.openSql;
import java.sql.*;
public class rdrzdtj1
{
public static void main(String[] args){
try{
String[]strSQL=new String[23];
strSQL[0]="SELECT Zdz From drzdtj WHERE Ycxh='1'";
strSQL[1]="SELECT Zdz From drzdtj WHERE Ycxh='2'";
strSQL[2]="SELECT Zdz From drzdtj WHERE Ycxh='3'";
strSQL[3]="SELECT Zdz From drzdtj WHERE Ycxh='4'";
strSQL[4]="SELECT Zdz From drzdtj WHERE Ycxh='5'";
strSQL[5]="SELECT Zdz From drzdtj WHERE Ycxh='6'";
strSQL[6]="SELECT Zdz From drzdtj WHERE Ycxh='7'";
strSQL[7]="SELECT Zdz From drzdtj WHERE Ycxh='8'";
strSQL[8]="SELECT Zdz From drzdtj WHERE Ycxh='9'";
strSQL[9]="SELECT Zdz From drzdtj WHERE Ycxh='10'";
strSQL[10]="SELECT Zdz From drzdtj WHERE Ycxh='11'";
strSQL[11]="SELECT Zdz From drzdtj WHERE Ycxh='12'";
strSQL[12]="SELECT Zdz From drzdtj WHERE Ycxh='13'";
strSQL[13]="SELECT Zdz From drzdtj WHERE Ycxh='14'";
strSQL[14]="SELECT Zdz From drzdtj WHERE Ycxh='15'";
strSQL[15]="SELECT Zdz From drzdtj WHERE Ycxh='16'";
strSQL[16]="SELECT Zdz From drzdtj WHERE Ycxh='17'";
strSQL[17]="SELECT Zdz From drzdtj WHERE Ycxh='18'";
strSQL[18]="SELECT Zdz From drzdtj WHERE Ycxh='19'";
strSQL[19]="SELECT Zdz From drzdtj WHERE Ycxh='20'";
strSQL[20]="SELECT Zdz From drzdtj WHERE Ycxh='21'";
strSQL[21]="SELECT Zdz From drzdtj WHERE Ycxh='22'";
strSQL[22]="SELECT Zdz From drzdtj WHERE Ycxh='23'";
int i;
int j;
float[][]redrzdtj=new float[23][24];
for(i=0;i<23;i++)
{
for(j=0;j<24;j++)
{
redrzdtj[j]=80f;
}
}
openSql c = new openSql();
for (i=0;i<23;i++)
{
j=0;
ResultSet results=c.executeQuery(strSQL);
while(results.next()&&(j<24))
{
redrzdtj[j]=results.getFloat(1);
//System.out.println(dayresult[0][j]);
j++;
}
}
for(i=0;i<23;i++)
{
for(j=0;j<24;j++)
{
System.out.println("序列号:"+i+":"+redrzdtj[j]);
}
}
}
catch(SQLException se){
System.out.println("SQLException:"+se);
}
}
}
欢迎lai到Java学习者論坛,轉載请注明地址:http://www.javaxxz.com. |
|