<small id='TJF8x'></small><noframes id='TJF8x'>

  1. <tfoot id='TJF8x'></tfoot>

      <bdo id='TJF8x'></bdo><ul id='TJF8x'></ul>
  2. <i id='TJF8x'><tr id='TJF8x'><dt id='TJF8x'><q id='TJF8x'><span id='TJF8x'><b id='TJF8x'><form id='TJF8x'><ins id='TJF8x'></ins><ul id='TJF8x'></ul><sub id='TJF8x'></sub></form><legend id='TJF8x'></legend><bdo id='TJF8x'><pre id='TJF8x'><center id='TJF8x'></center></pre></bdo></b><th id='TJF8x'></th></span></q></dt></tr></i><div id='TJF8x'><tfoot id='TJF8x'></tfoot><dl id='TJF8x'><fieldset id='TJF8x'></fieldset></dl></div>
  3. <legend id='TJF8x'><style id='TJF8x'><dir id='TJF8x'><q id='TJF8x'></q></dir></style></legend>
    1. 在eclipse中通过jdbc连接DB2数据库

      Connect to DB2 database in eclipse via jdbc(在eclipse中通过jdbc连接DB2数据库)

    2. <i id='LxYB9'><tr id='LxYB9'><dt id='LxYB9'><q id='LxYB9'><span id='LxYB9'><b id='LxYB9'><form id='LxYB9'><ins id='LxYB9'></ins><ul id='LxYB9'></ul><sub id='LxYB9'></sub></form><legend id='LxYB9'></legend><bdo id='LxYB9'><pre id='LxYB9'><center id='LxYB9'></center></pre></bdo></b><th id='LxYB9'></th></span></q></dt></tr></i><div id='LxYB9'><tfoot id='LxYB9'></tfoot><dl id='LxYB9'><fieldset id='LxYB9'></fieldset></dl></div>

        1. <small id='LxYB9'></small><noframes id='LxYB9'>

              <legend id='LxYB9'><style id='LxYB9'><dir id='LxYB9'><q id='LxYB9'></q></dir></style></legend>

                <tbody id='LxYB9'></tbody>
              <tfoot id='LxYB9'></tfoot>
                <bdo id='LxYB9'></bdo><ul id='LxYB9'></ul>

              • 本文介绍了在eclipse中通过jdbc连接DB2数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试通过 JDBC 使用 Eclipse(Juno 版)连接到 IBM DB2 数据库.我已将驱动程序(外部 jar 文件)添加到我的项目中,并且驱动程序已正确加载...

                I'm trying to connect to an IBM DB2 database with Eclipse (version Juno) via JDBC. I've added the drivers (external jar files) to my project and the driver is loaded correctly ...

                public static void main(String[] args) throws SQLException, ClassNotFoundException {
                    Class.forName("com.ibm.db2.jcc.DB2Driver");
                    System.out.println("Driver loaded");
                
                    Connection dbConn = DriverManager.getConnection("jdbc:db2://***.**.***.*:50000/BWUEBDB", "username", "password");
                    System.out.println("Connected");
                }
                

                我也知道连接数据(数据库路径、用户名、密码)是正确的.但我得到一个 java.lang.NoClassDefFoundError:

                I also know that the connection data (database path, username, password) is correct. But I get a java.lang.NoClassDefFoundError:

                Exception in thread "main" java.lang.NoClassDefFoundError: sun/io/UnknownCharacterException
                    at com.ibm.db2.jcc.b.a.<init>(a.java:238)
                    at com.ibm.db2.jcc.b.b.a(b.java:1624)
                    at com.ibm.db2.jcc.c.p.a(p.java:350)
                    at com.ibm.db2.jcc.c.p.<init>(p.java:404)
                    at com.ibm.db2.jcc.b.b.<init>(b.java:256)
                    at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:163)
                    at java.sql.DriverManager.getConnection(Unknown Source)
                    at java.sql.DriverManager.getConnection(Unknown Source)
                    at AppTest.main(AppTest.java:17)
                Caused by: java.lang.ClassNotFoundException: sun.io.UnknownCharacterException
                    at java.net.URLClassLoader$1.run(Unknown Source)
                    at java.net.URLClassLoader$1.run(Unknown Source)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at java.net.URLClassLoader.findClass(Unknown Source)
                    at java.lang.ClassLoader.loadClass(Unknown Source)
                    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
                    at java.lang.ClassLoader.loadClass(Unknown Source)
                    ... 9 more
                

                项目属性一定有问题,但我真的不知道去哪里找.

                There must be something wrong with the project properties but I really don't know where to look for.

                推荐答案

                我遇到了同样的错误.我使用 java 8 运行它,我切换到 Java 7 并且它工作正常.

                I was getting the same error. I was running it using java 8, I switched to Java 7 and it worked.

                这篇关于在eclipse中通过jdbc连接DB2数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)
                Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)
                Eclipse- JDK not found(Eclipse-找不到JDK)
                How to make Eclipse behave well in the Windows 7 taskbar?(如何让 Eclipse 在 Windows 7 任务栏中表现良好?)
                FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)(本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197))

                <legend id='CJTNt'><style id='CJTNt'><dir id='CJTNt'><q id='CJTNt'></q></dir></style></legend>
                    <tbody id='CJTNt'></tbody>

                      <i id='CJTNt'><tr id='CJTNt'><dt id='CJTNt'><q id='CJTNt'><span id='CJTNt'><b id='CJTNt'><form id='CJTNt'><ins id='CJTNt'></ins><ul id='CJTNt'></ul><sub id='CJTNt'></sub></form><legend id='CJTNt'></legend><bdo id='CJTNt'><pre id='CJTNt'><center id='CJTNt'></center></pre></bdo></b><th id='CJTNt'></th></span></q></dt></tr></i><div id='CJTNt'><tfoot id='CJTNt'></tfoot><dl id='CJTNt'><fieldset id='CJTNt'></fieldset></dl></div>

                      • <tfoot id='CJTNt'></tfoot>
                        • <bdo id='CJTNt'></bdo><ul id='CJTNt'></ul>
                        • <small id='CJTNt'></small><noframes id='CJTNt'>