开发者

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, e.g. 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.

What's go开发者_开发技巧ing on? If it's included, why does everyone install another copy?


You need the JDK, not the JRE.


Yes, you need the JDK instead of the 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. 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?)


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. No more need to find and configure your own JDBC database when developing a database application! 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.

From your link and JavaDB != Derby (which is an apache product).


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. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜