简体   繁体   English

Java 6中是否包含Derby / Java DB?

[英]Is Derby/Java DB included in Java 6?

I've read in a couple of places that Derby/Java DB is included in Java SE 6, eg http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/beta2.html but I can't find anyone who has used it without installing it, including it on the classpath, etc. 我在几个地方读过Derby / Java DB包含在Java SE 6中,例如http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/beta2.html但我不能找到任何使用它而不安装它的人,包括它在类路径上等等。
What's going on? 这是怎么回事? If it's included, why does everyone install another copy? 如果包含它,为什么每个人都安装另一个副本?

您需要JDK,而不是JRE。

Yes, you need the JDK instead of the JRE. 是的,您需要JDK而不是JRE。 But after running into this same problem, I found that the JDK installer had placed Java DB (on my Windows XP environment) in C:\\Program Files\\Sun\\JavaDB. 但在遇到同样的问题之后,我发现JDK安装程序已将Java DB(在我的Windows XP环境中)放在C:\\ Program Files \\ Sun \\ JavaDB中。 You might want to check there, or whatever is equivalent in your environment. 您可能想要在那里检查,或者在您的环境中检查等效的内容。

I hope this helps any other people who might find themselves on this page. 我希望这可以帮助任何其他可能发现自己在此页面上的人。 (Why does Java development have to be this frustrating?) (为什么Java开发必须令人沮丧?)

Database 数据库

For a great out-of-the-box development experience with database applications, the Java SE 6 development kit – though not the Java Runtime Environment (JRE) – co-bundles the all-Java JDBC database, Java DB based on Apache Derby. 为了获得有关数据库应用程序的开箱即用的开发体验,Java SE 6开发工具包 - 尽管不是Java运行时环境(JRE) - 共同捆绑了基于Apache Derby的全Java JDBC数据库Java DB。 No more need to find and configure your own JDBC database when developing a database application! 在开发数据库应用程序时,不再需要查找和配置自己的JDBC数据库! Developers will also get the updated JDBC 4.0, a well-used API with many important improvements, such as special support for XML as an SQL datatype and better integration of Binary Large OBjects (BLOBs) and Character Large OBjects (CLOBs) into the APIs. 开发人员还将获得更新的JDBC 4.0,这是一个经过充分利用的API,具有许多重要的改进,例如对XML作为SQL数据类型的特殊支持以及将二进制大对象(BLOB)和字符大对象(CLOB)更好地集成到API中。

From your link and JavaDB != Derby (which is an apache product). 从你的链接和JavaDB != Derby (这是一个apache产品)。

It's "included" in that the code is part of the JDK download, but the Derby jars aren't automatically placed on the classpath because not every Java app needs Derby. 它是“包含”的,因为代码是JDK下载的一部分,但是Derby jar不会自动放在类路径上,因为不是每个Java应用都需要Derby。 The Derby (JavaDB) jars that are included in the JDK download are fine for use in any J2SE java app you might write, and you certainly don't need to install another copy, just put those jars into your classpath for those apps for which it is appropriate. JDK下载中包含的Derby(JavaDB)jar可以在你可能编写的任何J2SE java应用程序中使用,而且你当然不需要安装另一个副本,只需将这些jar放入你的类路径中。这是合适的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM