如何在Eclipse中设置JDBC? [英] how to setup JDBC in Eclipse?

查看:194
本文介绍了如何在Eclipse中设置JDBC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有eclipse和j开发人员,对eclipse更加满意.我想知道如何在eclipse中设置JDBC驱动程序,我从oracle.com下载了一个驱动程序,但是单击"库"标签中"java构建路径"中的外部jar".我的数据库是Oracle Express Edition.

I have eclipse and j developer,I am more comfortable with eclipse.I want to know how to setup the JDBC driver in eclipse,I downloaded a driver from oracle.com but it does not appear anywhere when I browse after clicking 'external jars' in 'java build path' in "libraries" tab. My database is Oracle express edition.

是否有用于Java应用程序开发的良好pdf或教程?我想制作一个前端应用程序,在该应用程序中,我将数据输入字段并插入到DB中,并使其能够在例如输入时也可以检索信息.一个ID.

Are there any good pdf's or tutorials for java application development?I want to make a front end application where I enter data into fields and it inserts into DB,and make it such that we can also retrieve information when we enter for example an ID.

此过程需要什么材料?我不想学习得太深,但我想在过程中学习(这不是一个项目,只是我本月想要实现的目标),所以我想我需要 1.一本关于awt,swing类的书 2.我需要设置此JDBC,但我不了解如何使其在eclipse中启动并运行,我键入代码会给我错误. 3.一本有关如何将Java连接到Oracle Express Edition DB的书. 我有JDK 1.7.0.0.3

What are the materials required for this?I don't want to learn too deep but I want to learn in the process(this is not a project just something I wanna achieve this month) so I am guessing i need 1. a book on awt,swing classes 2. I need to set this JDBC thing I don't understand how to get it up and running in eclipse,i type code it gives me error. 3.a book on how to connect java to oracle express edition DB. I have JDK 1.7.0.0.3

预先感谢(我是初学者;))

Thanks in advance(i'm a beginner ;))

推荐答案

如果要在您的Eclipse项目中包含一个JAR文件,通常会在项目文件夹中创建一个"lib"文件夹,并将该文件放入在那里.然后,您需要告诉eclipse将其包含在类路径中,这样您的代码才能在eclipse中编译并运行.

If you're wanting to include a JAR file to your Eclipse project, you would generally create a 'lib' folder inside the project folder, and put the file in there. You then need to tell eclipse to include it in your class path so your code will compile and run inside eclipse.

要这样做: -进入项目的属性 -在左侧栏中选择"Java构建路径" -选择窗口中心部分的库"标签 -单击添加JAR"按钮-这将为您提供eclipse中的项目列表-展开项目并进入lib文件夹-jar将在其中. -选择JAR,单击确定",然后再次从属性窗口中退出.

To do that: - Go into the properties of your project - Select 'Java Build Path' in the left hand column - Select the 'Libraries' tab in the centre part of the window - Click the Add JARs button - this will give you a list of your projects in eclipse - expand your project and into the lib folder - your jar will be there. - Select the JAR, click OK, and OK again out of the properties window.

或者,您可以右键单击jar,然后单击BuildPath-> Add to Build Path.

Or, you can just right-click the jar and click BuildPath->Add to Build Path.

这篇关于如何在Eclipse中设置JDBC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆