Prev: how to record screen acrtions programatically?
Next: Build A Home Internet Business For Extra Income Stream
From: John B. Matthews on 3 Apr 2010 19:14 In article <ku6fr59sve7pj63machls6i9mvb0sfbb6p(a)4ax.com>, Roedy Green <see_website(a)mindprod.com.invalid> wrote: > On Sat, 3 Apr 2010 14:31:46 +0100, Tom Anderson <twic(a)urchin.earth.li> > wrote, quoted or indirectly quoted someone who said : > > > > >I haven't used Derby since before 1.6, so i have no positive control for > >how this should work. > > see http://mindprod.com/jgloss/jdbc.html#CONNECTING > > for sample code to connect to various SQL engines including Derby. My > two Derby examples are for windows. I would hope Mac would be > identical or very similar. I've been using javax.sql.DataSource to give each database thread its own connection: import org.h2.jdbcx.JdbcDataSource; JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:file:~/src/java/jdbc/test;IFEXISTS=TRUE"); Connection conn = ds.getConnection("name", "password"); import org.apache.derby.jdbc.EmbeddedDataSource; EmbeddedDataSource ds = new EmbeddedDataSource(); ds.setDatabaseName("/Users/Shared/.netbeans-derby/dbtest"); conn = ds.getConnection("name", "password"); -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
From: Wayne on 4 Apr 2010 03:05 Tom Anderson wrote: > Hi all, > > Derby aka JavaDB is included in JDK 1.6, right? It is in 1.6.16, but Oracle has un-bundled it from the newest versions of the JDK, despite the notice on the JavaDB page that says it is bundled. You can download it from <http://developers.sun.com/javadb/downloads/>. -- Wayne
From: Lew on 4 Apr 2010 12:59 Tom Anderson wrote: >> Derby aka JavaDB is included in JDK 1.6, right? Wayne wrote: > It is in 1.6.16, but Oracle has un-bundled it from the > newest versions of the JDK, despite the notice on the JavaDB > page that says it is bundled. That is /so/ not true! -- Lew
From: Wayne on 4 Apr 2010 14:01 Lew wrote: > Tom Anderson wrote: >>> Derby aka JavaDB is included in JDK 1.6, right? > > Wayne wrote: >> It is in 1.6.16, but Oracle has un-bundled it from the >> newest versions of the JDK, despite the notice on the JavaDB >> page that says it is bundled. > > That is /so/ not true! > I hate posting wrong information! Sorry! But, on my Windows 7 system the install for 1.6.0_19 did not ask about JavaDB and didn't install Derby anyplace I could find it (such as C:\Program Files(x86)\Sun or ...\Java or C:\Sun or C:\Program Files\Sun). My attempts to use it resulted in the expected errors, as the derby jars were not on CLASSPATH or in any ext directory. The FAQ, README, and Install help did not discuss JavaDB (or Derby). In the end I downloaded JavaDB separately and it went just where I expected. Then when I read this thread I posted the information. Could you please post where the JavaDB bundled with the JDK gets installed to, on a Windows 7 system (32 or 64 bit)? Thanks! -- Wayne
From: Lew on 4 Apr 2010 14:52
Tom Anderson wrote: >>>> Derby aka JavaDB is included in JDK 1.6, right? > Wayne wrote: >>> It is in 1.6.16, but Oracle has un-bundled it from the >>> newest versions of the JDK, despite the notice on the JavaDB >>> page that says it is bundled. > Lew wrote: >> That is /so/ not true! > Wayne wrote: > I hate posting wrong information! Sorry! But, on my Windows 7 > system the install for 1.6.0_19 did not ask about JavaDB > and didn't install Derby anyplace I could find it (such as > C:\Program Files(x86)\Sun or ...\Java or C:\Sun or C:\Program Files\Sun). > My attempts to use it resulted in the expected errors, as the derby jars > were not on CLASSPATH or in any ext directory. > > The FAQ, README, and Install help did not discuss JavaDB (or Derby). > In the end I downloaded JavaDB separately and it went just where I > expected. Then when I read this thread I posted the information. > > Could you please post where the JavaDB bundled with the JDK gets installed > to, on a Windows 7 system (32 or 64 bit)? Thanks! > I just now downloaded the Windows 32-bit JDK SE 6u19 installation program, but I don't have Windows 7. Still, it's the same installation program so I suspect the conclusion I draw is valid. The installation program after you accept the license displays a dialog that lets you alter installation directories for the Java components. It lists five components, the fifth of which is called "Java DB". The default directory for that component is "C:\Program Files\Sun\JavaDB". (I routinely change that.) I don't know how you could have missed it. -- Lew |