---本地环境
操作系统:winxp sp2
系统编码:GBK
JDK版本:1.5.02
JDBC版本:INFORMIX JDBC.2.21.JC6
         INFORMIX JDBC.3.00.JC1
CLASSPATH设置: .;C:\informix\jdbc221jc6\lib
               .;C:\informix\jdbc300jc1\lib
PATH设置: C:\JDK1502\bin
源代运行路径: D:\demo执行命令:
 1.java SimpleConnection jdbc:informix-sqli://192.168.0.1:1533:informixserver=myserver;user=username;password=password           
 2.java SimpleConnection jdbc:informix-sqli://192.168.0.1:1533/testdb:informixserver=myserver;user=username;password=password  问题1:
  当使用JDBC版本:INFORMIX JDBC.2.21.JC6时,在给定错误URL的情况下运行异常System.out.println(e.getMessage())的返回为"FAILED: ??????????????????????????????",但当使用JDBC版本:INFORMIX JDBC.3.00.JC1时异常返回显示正常,请问如何解决异常返回乱码??
  
问题2:
  当使用JDBC版本:INFORMIX JDBC.2.21.JC6时,执行命令1时返回正常,执行命令2时返回正常,但当使用JDBC版本:INFORMIX JDBC.3.00.JC1时,执行命令1时返回正常,但当执行命令2时返回如下异常信息,请问这是怎么回事??
Exception in thread "main" java.lang.ClassCastException: java.lang.NoClassDefFoundError
        at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:266)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at testdb.main(SimpleConnection.java:66)            
 
---源代如下
import java.sql.*;
import java.util.*;public class SimpleConnection {    public static void main(String[] args)
    {
        if (args.length == 0)
    {
    System.out.println("FAILED: connection URL must be provided in order to run the demo!");
    return;
    }        String url = args[0];        String testName = "Simple Connection"; Connection conn = null; System.out.println(">>>" + testName + " test.");
System.out.println("URL = \"" + url + "\""); try 
    {
    Class.forName("com.informix.jdbc.IfxDriver");
    } 
catch (Exception e)
    {
    System.out.println("FAILED: failed to load Informix JDBC driver.");
    System.out.println(e.getMessage());
    } try 
    {
    conn = DriverManager.getConnection(url);
    } 
catch (SQLException e) 
    {
    System.out.println("FAILED: failed to connect!");
    System.out.println(e.getMessage());
    } try 
    {
            conn.close();
    } 
catch (SQLException e) 
    {
    System.out.println("FAILED: failed to close the connection!");
    System.out.println(e.getMessage());
    } System.out.println(">>>End of " + testName + " test.");
    }
}